-
Standard input is already opened for your as STDIN, so
# slurp the email from STDIN
my( $raw );
{ local $/ = undef; local *FILE; open FILE, "-"; $raw = <FILE>; close
+FILE }
is an overly complex way of doing
# slurp the email from STDIN
my $raw; { local $/; $raw = <STDIN>; }
-
Why are you forcing a list assignment?
my( $raw_iohandle ) = new IO::Scalar( \$raw );
should be
my $raw_iohandle = new IO::Scalar( \$raw );
But then again, IO::Scalar is not nearly as robust as the native support for scalar handles added to 5.8
open(my $raw_iohandle, '<', \$raw );
-
Finally, if the module expects a system file handle (e.g. if it attempts a child process to read from it), it'll be disappointed by your attempts since none of the Perl file handles you are producing have a system file handle associated with it.