I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2007-02-21 20:34:33-08 by mykhyggz
Uninitialized values
Consider this snippet, taken pretty directly from the pod examples: my $mail = Email::MIME->new( $message ); my $stripper = Email::MIME::Attachment::Stripper->new($mail); my Email::MIME $txt = $stripper->message; my @attachments = $stripper->attachments; Problem is it creates this noise: Use of uninitialized value in pattern match (m//) at C:/Perl/site/lib/Email/MIME .pm line 90, <GEN0> line 26454. ... for every message. no warnings 'uninitialized'; didn't help So, I made this change to head off the errors: sub header { my $header = shift->SUPER::header(@_) || ''; # this is my change if ($header !~ /=\?/) { return $header } # this is line 90 if (eval { require Encode }) { Encode::decode("MIME-Header", $header); } else { require MIME::Words; MIME::Words::decode_mimewords($header); } } Any thoughts?
Direct Responses: Write a response