--- Image-Xpm-1.11/Xpm.pm- 2009-11-26 21:18:10.000000000 +0300 +++ Image-Xpm-1.11/Xpm.pm 2010-06-10 20:19:51.853069856 +0400 @@ -323,14 +323,9 @@ sub load { # Object method open $fh, $file or croak "load() failed to open `$file': $!" ; } elsif( ref($file) eq 'SCALAR' ) { - if( $] >= 5.008001 ) { # 5.8.0 dumps core when using "scalar open" - eval q{ open $fh, "<", $file } # avoid syntax error with pre-5.6 perls - or croak "cannot handle scalar value: $!"; - } - else { - require IO::String; - $fh = IO::String->new( $$file ); - } + use 5.008001; + open $fh, "<", \$$file + or croak "cannot handle scalar value: $!"; } else { seek($file, 0, 0) or croak "load() can't rewind handle for `$file': $!";