Created
May 6, 2014 06:30
-
-
Save VladimirSaz/11554390 to your computer and use it in GitHub Desktop.
PERL - overload class implement
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sub new | |
{ | |
my $class = shift; | |
my %params = @_; | |
# | |
#some code here | |
# | |
my $self = $class->SUPER::new(%params); | |
$class = ref $class if ref $class; | |
bless $self, $class; | |
return $self; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment