Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^3: Wrong + Right = Even Worse

by tobyink (Abbot)
on Apr 03, 2014 at 22:41 UTC ( #1081023=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Wrong + Right = Even Worse
in thread Wrong + Right = Even Worse

Or ::subroutine() (the main is optional). That seems simpler than changing everything else though, and less hacky than trying to fool %INC (which will probably lead you to a whole bunch of warnings in the redefine category if warnings are enabled).

use Moops; class Cow :rw { has name => (default => 'Ermintrude') }; say Cow->new->name


Comment on Re^3: Wrong + Right = Even Worse
Select or Download Code
Re^4: Wrong + Right = Even Worse
by choroba (Abbot) on Apr 03, 2014 at 22:44 UTC
    You can guess - legacy code. No strict, no warnings. I can get almost there with simple
    s/&/::/g

    There would've been no redefine warnings, though. I need the scripts to be read again, because the subroutines are going to a different namespace, therefore nothing gets redefined.

    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others drinking their drinks and smoking their pipes about the Monastery: (11)
As of 2014-12-20 22:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

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





    Results (99 votes), past polls