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

Re: strict refs

by Krambambuli (Deacon)
on Oct 28, 2008 at 09:13 UTC ( #719942=note: print w/ replies, xml ) Need Help??


in reply to strict refs

The following works for me:

foreach (@{ $DBI::EXPORT_TAGS{sql_types} }) { my $ref = \&{"DBI::$_"}; printf "%s=%d\n", $_, &$ref; }
It is documented in strict:
There is one exception to this rule: $bar = \&{’foo’}; &$bar; is allowed so that "goto &$AUTOLOAD" would not break unde +r stricture.
Hth,

Krambambuli
---


Comment on Re: strict refs
Select or Download Code
Re^2: strict refs
by LesleyB (Friar) on Oct 28, 2008 at 09:35 UTC

    Yes, Krambabuli, it does help and it does work for me too.

    Thank you for pointing out the documentation on it

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others contemplating the Monastery: (9)
As of 2014-12-21 19:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (107 votes), past polls