sub new { my $class_self = shift; # Could be a class, or an already blessed # object from another method. my $class; if (ref $class_self) { $class = ref $class_self } else { $class = $class_self; } my %arg = @_; my $self = { file => $arg{'filespec'} }; bless $self, $class; }