Just wondering if this code snippet will behave as expected, and if not
then why not? :)
--START--
our %InheritableClassData = (
DBH => undef,
Q => undef,
Handler => undef,
);
foreach (qq(DBH Q Handler)) { sub $_ { shift; $InheritableClassData{$_} = shift if @_; return $InheritableClassData{$_}; } } ---END---
Looks realy good here, I might use a closure through a typeglob to assign the subroutine though.
--K-sPecial
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>