20 lines
281 B
Perl
20 lines
281 B
Perl
package Person;
|
|
|
|
use warnings;
|
|
use strict;
|
|
sub new {
|
|
my $self = {};
|
|
bless ($self, "Person");
|
|
return $self;
|
|
}
|
|
1;
|
|
|
|
|
|
#Now we can use our Person class to create an object:
|
|
#/usr/bin/perl
|
|
|
|
use warnings;
|
|
use strict;
|
|
use Person;
|
|
my $person = Person->new();
|