else {
local $SIG{__DIE__};
my $loaded = eval {
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
++$attempted_to_load{$file};
require $file;
return 1;
if ( $opts{'xexpr'} and $opts{'yexpr'} ) {
if (!$I2P) {
- eval ("use Affix::Infix2Postfix;");
- print $@;
+ {
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ eval ("use Affix::Infix2Postfix;");
+ }
+
if ( $@ ) {
$self->{ERRSTR}='transform: expr given and Affix::Infix2Postfix is not avaliable.';
return undef;
# - something for Module::ScanDeps to analyze
# https://rt.cpan.org/Ticket/Display.html?id=6566
local $@;
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
eval { require Imager::File::GIF };
eval { require Imager::File::JPEG };
eval { require Imager::File::PNG };
use strict;
use vars qw($VERSION);
-$VERSION = "1.006";
+$VERSION = "1.007";
my %expr_types;
@ISA = qw(Imager::Expr);
use Imager::Regops qw(%Attr $MaxOperands);
-
-eval "use Parse::RecDescent;";
-__PACKAGE__->register_type('expr') if !$@;
+{
+ local @INC = @INC;
+ pop @INC if $INC[-1] eq '.';
+ eval "use Parse::RecDescent;";
+ __PACKAGE__->register_type('expr') if !$@;
+}
# I really prefer bottom-up parsers
my $grammar = <<'GRAMMAR';