Subject: | find() in preload_template might break @INC |
As the patch attached, no_chdir is supposed to be set 'cause Text::Xslate::compiler() requires Mouse inside.
perl -Mlib=./lib ...
In case like the above, require will be affected by chdir involked in File::Find::find().
Subject: | preload_template.patch |
diff -r Catalyst-View-Xslate-0.00017.orig/lib/Catalyst/View/Xslate.pm Catalyst-View-Xslate-0.00017/lib/Catalyst/View/Xslate.pm
193,198c193,201
< File::Find::find( sub {
< if (/\Q$suffix\E$/) {
< my $file = $File::Find::name;
< $file =~ s/\Q$path\E .//xsm;
< $xslate->load_file($file);
< }
---
> File::Find::find( {
> no_chdir => 1,
> wanted => sub {
> if (/\Q$suffix\E$/) {
> my $file = $File::Find::name;
> $file =~ s/\Q$path\E .//xsm;
> $xslate->load_file($file);
> },
> },