'delete $INC{"Foo"}; use Foo;'
####
package Filter::Test;
use Filter::Simple;
FILTER_ONLY
code => sub {
# print'C: ', $_;
s[eval\s*($Filter::Simple::placeholder)]['<<<<<1>>>>>' eval '<<<<<2>>>>>' . $1 ];
# print'C: ', $_;
$_;
},
quotelike => sub {
# print 'Q: ', $_;
$_ = uc $_;
s['<<<<<1>>>>>'][delete \$INC{'Filter/Test.pm'};];
s['<<<<<2>>>>>']["BEGIN{ require Filter::Test; Filter::Test::import}"];
# print 'Q: ', $_;
$_;
},
;
print 'Filter::Test loaded';
##
##
#! perl -slw
use strict;
use Filter::Test;
print 'Hello World from ', __PACKAGE__;
eval "print 'Just another perl hacker'";
#require 'My/filtertest.pm';
##
##
package My::filtertest;
print 'Hello World';
eval "print 'Just another perl hacker';";
1;
##
##
P:\test>296091
Filter::Test loaded
HELLO WORLD FROM main
P:\test>296091
Filter::Test loaded
HELLO WORLD FROM main
Filter::Test loaded
Use of uninitialized value in concatenation (.) or string at d:/Perl/lib/Filter/Simple.pm line 156.
Use of uninitialized value in concatenation (.) or string at d:/Perl/lib/Filter/Simple.pm line 156.
String found where operator expected at (eval 5) line 1, near "PRINT 'JUST ANOTHER PERL HACKER'"
(Do you need to predeclare PRINT?)
P:\test>