luis.roca has asked for the wisdom of the Perl Monks concerning the following question:
I'm having a hard time tracking down an error:
returned when I try uploading an image in Movable Type 5. Using Carp::Always and the debugger I fixed a few undefined variables. I'm still getting an error from the BEGIN block in MT5's Bootstrap.pm file and an eval which I still haven't tracked down (possibly from CMS.pm).Undefined subroutine &main:: called
Having done several searches, the closest issue I found that resembled what's happening was this on Movable Type's Forums which suggests it could have something to do with the version of Image::Size and/or Image::Magick. However, when I checked Movable Type's FogBugz report that very similar issue couldn't be recreated and was closed.
Below is the BEGIN block from MT5's Bootstrap.pm. Any direction is appreciated.
sub BEGIN { my ( $dir, $orig_dir ); require File::Spec; if ( !( $dir = $ENV{MT_HOME} ) ) { if ( $0 =~ m!(.*([/\\]))! ) { $orig_dir = $dir = $1; my $slash = $2; $dir =~ s!(?:[/\\]|^)(?:plugins[/\\].*|tools[/\\])$!$slash +!; $dir = '' if ( $dir =~ m!^\.?[\\/]$! ); } elsif ( $] >= 5.006 ) { # MT_DIR/lib/MT/Bootstrap.pm -> MT_DIR/lib/MT -> MT_DIR/lib - +> MT_DIR require File::Basename; $dir = File::Basename::dirname( File::Basename::dirname( File::Basename::dirname( File::Spec->rel2abs(__FIL +E__) ) ) ); } unless ($dir) { $orig_dir = $dir = $ENV{PWD} || '.'; $dir =~ s!(?:[/\\]|^)(?:plugins[/\\].*|tools[/\\]?)$!!; } $ENV{MT_HOME} = $dir; } unshift @INC, File::Spec->catdir( $dir, 'extlib' ); unshift @INC, File::Spec->catdir( $orig_dir, 'lib' ) if $orig_dir && ( $orig_dir ne $dir ); }
"...the adversities born of well-placed thoughts should be considered mercies rather than misfortunes." — Don Quixote
|
---|
Replies are listed 'Best First'. | |
---|---|
Re: MT5: Undefined Subroutine Called Uploading Image
by oko1 (Deacon) on Feb 17, 2012 at 21:06 UTC | |
Re: MT5: Undefined Subroutine Called Uploading Image
by Anonymous Monk on Feb 17, 2012 at 19:10 UTC |
Back to
Seekers of Perl Wisdom