[Chicago-talk] ->can and AUTOLOAD

Jay Strauss me at heyjay.com
Thu Dec 4 11:41:49 CST 2003


I don't know what you mean here.  Can you give a full example?

thanks
Jay
----- Original Message ----- 
From: "Steven Lembark" <lembark at wrkhors.com>
To: "Chicago.pm chatter" <chicago-talk at mail.pm.org>
Sent: Thursday, December 04, 2003 11:08 AM
Subject: Re: [Chicago-talk] ->can and AUTOLOAD


> 
> 
> -- Jay Strauss <me at heyjay.com>
> 
> > Here is how I did it:
> >
> > sub AUTOLOAD {
> >
> >     no strict "refs";
> 
> You are probably better off pushing this into the code
> at the lowest possible level:
> 
> my $install = sub { ... };
> 
> {
> no strict 'refs';
> 
> ${$package . '::' . $name} = $install;
> }
> 
> goto $install
> 
> 
> This saves you from making wierd mistakes in the AUTOLOAD
> that strict normally catches for you.
> 
> --
> Steven Lembark                               2930 W. Palmer
> Workhorse Computing                       Chicago, IL 60647
>                                             +1 888 359 3508
> _______________________________________________
> Chicago-talk mailing list
> Chicago-talk at mail.pm.org
> http://mail.pm.org/mailman/listinfo/chicago-talk
> 
> 




More information about the Chicago-talk mailing list