Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^2: RFC: Perl Second-Best Practices

by sfink (Deacon)
on Dec 24, 2005 at 20:01 UTC ( [id://518927]=note: print w/replies, xml ) Need Help??


in reply to Re: RFC: Perl Second-Best Practices
in thread RFC: Perl Second-Best Practices

I'm not very good at symbol table stuff, but it seems like you could spell that out with less punctuation and in a strict-safe way with
$main::{$class."::"}{"get_$name"} = sub { ... }

Replies are listed 'Best First'.
Re^3: RFC: Perl Second-Best Practices ($main::{"a::b::"})
by tye (Sage) on Dec 24, 2005 at 20:59 UTC

    Not if $class contains "::" (at least not on the last version of Perl I tried it on).

    [ Though, I suppose you could throw Data::Diver into the mix to solve that problem and get a much more complicated solution that meets some irrational fear of ever disabling 'strict' :) ]

    - tye        

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2024-03-28 16:43 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found