1#!./perl 2 3use strict; 4use warnings; 5 6sub freeze_at_begin { 7 my ($var) = @_; 8 9 return $var =~ m{$var}o; 10} 11 12BEGIN { 13 chdir 't' if -d 't'; 14 require './test.pl'; 15 16 freeze_at_begin('frozen'); 17} 18 19plan tests => 2; 20 21ok( !freeze_at_begin('not'), "/o done at begin is preserved and a new string does not match" ); 22ok( freeze_at_begin('frozen'), "/o done at begin is preserved and the original string matches" ); 23 241; 25 26# 27# ex: set ts=8 sts=4 sw=4 et: 28# 29