Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re^4: SVN::Client subclassing issue (AUTOLOAD)

by tye (Cardinal)
on Sep 27, 2011 at 20:20 UTC ( #928172=note: print w/ replies, xml ) Need Help??


in reply to Re^3: SVN::Client subclassing issue
in thread SVN::Client subclassing issue

our $AUTOLOAD; sub AUTOLOAD { my( $self )= shift @_; my( $class, $method )= $AUTOLOAD =~ /^(.+)(?:'|::)(.+)$/ or die "Invalid method name: $AUTOLOAD"; return if 'DESTROY' eq $method; die "Can't call internal method, $method, via ", __PACKAGE__, $/ if $method =~ /^_/; return $self->{whatever}->$method( @_ ); }

Not so much "proper" or "elegant" but a thrown-together example but also not "improper" nor particularly "inelegant".

- tye        


Comment on Re^4: SVN::Client subclassing issue (AUTOLOAD)
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://928172]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-12-20 05:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (95 votes), past polls