Alex Francis wrote:
> sub AUTOLOAD {
>     my $self = shift;
>     our $AUTOLOAD;
>     ( my $method = $AUTOLOAD ) =~ s/.*:://ms;
>     # Automatically delegate to OrigObj if we can
>     if ( $self->OrigObj && $self->OrigObj->can( $method ) ) {
>         return $self->OrigObj->$method( @_ );
>     }
>     # Ignore calls to DESTROY, Perl generates these because of this AUTOLOAD
>     if ( $method eq 'DESTROY' ) {
>         return;
>     }
>     my $package = blessed( $self );
>     croak qq{Can't locate object method "$method" via package "$package"};
> }
>   

I like this, so each extension object can treat $self like the original 
object as well... I'll adapt this a little and come back...


Lyle

_______________________________________________
BristolBathPM mailing list
[email protected]
http://mailman.bristolbath.org/mailman/listinfo/bristolbathpm

Reply via email to