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