#! perl -w use strict; package MyModule; sub new { my ($class, %args) = @_; my $self = { class => $class, verbose => $args{verbose} || 0, otheropt => $args{otheropt} || 0, }; bless $self, $class; return $self; } sub isFile { my $self = shift if ref $_[0] && ref $_[0] eq $_[0]->{class}; my $file = shift; # a file in current directory expected if (! -f $file) { print STDERR "*** $file: file not found in current directory\n"; return 0; } else { print STDERR "... $file: file found in current directory\n" if $self->{verbose}; return 1; } } # more subs ... 1;