package coolobject; use strict; our @ISA = qw/Exporter/; our @EXPORTER = qw/new/; sub new{ my $class = shift; my $self; $self->{name} = 'new'; bless ($self); if ($self->loaddata()){ return $self; }else{ $! = "Error loading data!"; undef $self; return undef; } } sub loaddata{ my $self = shift; return undef; }