Skip to content

Instantly share code, notes, and snippets.

@azurestone
Created May 19, 2010 15:28
Show Gist options
  • Select an option

  • Save azurestone/406429 to your computer and use it in GitHub Desktop.

Select an option

Save azurestone/406429 to your computer and use it in GitHub Desktop.
package Person;
sub new {
my ($class,$args) = @_;
my $self = bless $args, $class;
return $self;
}
sub self_introduction {
my $class = shift;
print 'My name is ' . $class->{name} . '.';
print 'I am ' . $class->{age} . ' years old.';
}
1;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment