Beefy Boxes and Bandwidth Generously Provided by pair Networks
Clear questions and runnable code
get the best and fastest answer
 
PerlMonks  

Re: Re: using modules with 'no warnings' in perl 5.005

by PodMaster (Abbot)
on Jul 29, 2003 at 08:20 UTC ( [id://278762]=note: print w/replies, xml ) Need Help??


in reply to Re: using modules with 'no warnings' in perl 5.005
in thread using modules with 'no warnings' in perl 5.005

Everybody is too eval(string) happy for my tastes ;)
BEGIN { eval { require warnings; 1 } or do { no strict 'refs'; *warnings::import = *warnings::unimport = sub{}; $INC{'warnings.pm'}=''; }; }

MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
** The third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: Re: using modules with 'no warnings' in perl 5.005
by liz (Monsignor) on Jul 29, 2003 at 08:28 UTC
    Ok, fair enough.

    One question though: the 1 in line 4 of your code seems superfluous to me. A successful 'require warnings' should return a true value anyway, no?

    Liz
      Yup, it's just a force of habit, like including a "1;" at the "official" end of every package within a single file.

      MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!"
      I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README).
      ** The third rule of perl club is a statement of fact: pod is sexy.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2024-04-25 09:07 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found