Hi! You mean something like:
--START-- our %InheritableClassData = ( DBH => undef, Q => undef, Handler => undef, ); foreach (keys %InheritableClassData) { $$_ = sub { shift; $InheritableClassData{$_} = shift if @_; return $InheritableClassData{$_}; }; } ---END--- ? :) Thanks heaps for your help! Regards, Michael S. E. Kraus Software Developer/Technical Support Specialist Wild Technology Pty Ltd ________________________________ ABN 98 091 470 692 Level 4 Tiara, 306/9 Crystal Street, Waterloo NSW 2017, Australia Telephone 1300-13-9453 | Facsimile 1300-88-9453 http://www.wildtechnology.net The information contained in this email message and any attachments may be confidential information and may also be the subject of client legal - legal professional privilege. If you are not the intended recipient, any use, interference with, disclosure or copying of this material is unauthorised and prohibited. This email and any attachments are also subject to copyright. No part of them may be reproduced, adapted or transmitted without the written permission of the copyright owner. If you have received this email in error, please immediately advise the sender by return email and delete the message from your system. -----Original Message----- From: news [mailto:[EMAIL PROTECTED] On Behalf Of K-sPecial Sent: Wednesday, 17 November 2004 4:19 PM To: [EMAIL PROTECTED] Subject: Spam:Re: Autmatic function creation Michael Kraus wrote: > 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> -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>