Guest User

Untitled

a guest
May 9th, 2012
34
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.23 KB | None | 0 0
  1. Perl inheritance
  2. my $class = 'My::Package';
  3.  
  4. my $file = $class; # Or:
  5. $file =~ s{::}{/}g; # eval "require $class;" or die $@;
  6. $file .= '.pm'; #
  7. require $file; #
  8.  
  9. if ($class->isa('My::Package::Parent')) {
  10. ...
  11. }
Advertisement
Add Comment
Please, Sign In to add comment