package test::log; use strict; use warnings; $test::log::VERSION = "0.0.1"; #============================================================================ ## @cmethod # The default constructor of class test::log #============================================================================ sub new { my $this=shift; my $class=ref($this) || $this; my $self= {}; #class attributes $self->{attr1}=undef; #bless the object bless($self,$class); #return the reference to the blesses object return($self); } sub logfilename { my $self = shift; my $logfilename; if (ref $self eq 'ARRAY' and $self->[1]) { $logfilename = ($self->[1]); } else { $logfilename = "DEFAULT_logfile_name"; } return $logfilename; } 1;