Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much

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.

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (11)
As of 2016-10-25 12:20 GMT
Find Nodes?
    Voting Booth?
    How many different varieties (color, size, etc) of socks do you have in your sock drawer?

    Results (317 votes). Check out past polls.