Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re: How can I suppress 'uninitialized' warnings in a CPAN module?

by toolic (Bishop)
on Nov 17, 2013 at 16:59 UTC ( #1063003=note: print w/ replies, xml ) Need Help??


in reply to How can I suppress 'uninitialized' warnings in a CPAN module?

Some of RTF::Tokenizer version 1.13:

# Reads a line from an IO:File'ish object sub _get_line { my $self = shift(); # Turn off warnings for the rest of this sub (at some point I'll u +pgrade # to 'no warnings "uninitialized"', but don't want to force a Perl + version # on people yet) local ($^W); # Localize the input record separator before changing it so # we don't mess up any other part of the application running # us that relies on it local $/ = $self->{_IRS}; # Read the line itself $self->{_BUFFER} .= $self->{_FILEHANDLE}->getline(); # <-------- +Line 208 }

It looks like there is an attempt to disable warnings in the sub. Does it not work?

Also, this bug report looks relevant: Eliminate warnings when EOF is reached.


Comment on Re: How can I suppress 'uninitialized' warnings in a CPAN module?
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1063003]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (4)
As of 2015-07-28 01:44 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









    Results (251 votes), past polls