Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Re^2: Passing DATA filehandle to a module under strict

by tobyink (Abbot)
on Jan 26, 2012 at 13:45 UTC ( #950088=note: print w/ replies, xml ) Need Help??


in reply to Re: Passing DATA filehandle to a module under strict
in thread Passing DATA filehandle to a module under strict

If the tool gets in your way of whatever you are doing, disable the tool for the time being.

Indeed, but when disabling strict, try to take advantage of the fact that strict is scoped, so you should disable it in the smallest scope possible. And no strict can take various arguments to control which parts of it you're disabling.

use strict; sub _foo { ... } LAX: { $caller = caller; no strict 'refs'; *{"$caller\::foo"} = \&_foo; }

'refs' is pretty much the only part of strict that it's ever a good idea to disable.


Comment on Re^2: Passing DATA filehandle to a module under strict
Select or Download Code

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2014-08-29 11:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    The best computer themed movie is:











    Results (280 votes), past polls