From: Rafael Kitover Date: Mon, 1 Mar 2010 10:37:43 +0000 (-0500) Subject: don't use @ARGV to slurp files X-Git-Tag: 0.06000~71 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=b0d2b3002de40e2ca7f68ae8d8a06d048747622e;p=dbsrgits%2FDBIx-Class-Schema-Loader.git don't use @ARGV to slurp files --- diff --git a/lib/DBIx/Class/Schema/Loader/Base.pm b/lib/DBIx/Class/Schema/Loader/Base.pm index 2ab55bd..d41f823 100644 --- a/lib/DBIx/Class/Schema/Loader/Base.pm +++ b/lib/DBIx/Class/Schema/Loader/Base.pm @@ -18,6 +18,7 @@ use Class::Unload; use Class::Inspector (); use Data::Dumper::Concise; use Scalar::Util 'looks_like_number'; +use File::Slurp 'slurp'; require DBIx::Class; our $VERSION = '0.05003'; @@ -797,9 +798,7 @@ sub _load_external { # upgrade. See skip_load_external to disable this feature. EOF - my $code = do { - local ($/, @ARGV) = (undef, $old_real_inc_path); <> - }; + my $code = slurp $old_real_inc_path; $code = $self->_rewrite_old_classnames($code); if ($self->dynamic) {