package MyModule; use version; use warnings; use strict; use Carp; use CGI; use base qw( Exporter ); our $VERSION = qv ('0.0.1'); our @ISA = qw (Exporter); our @EXPORT_OK = qw (new); our %EXPORT_TAGS = ( DEFAULT => [qw (new) ], All => [qw (new bar browserEnv)] ); sub new{ my $class = shift; my $self = {}; my %arg = @_; $self->{ResourcePath} = $arg{ResourcePath}; $self->{AssignedVal} = $arg{AssignedVal}; bless ($self, $class); return $self; } sub bar{ my $self = shift; print "
Testing, called sub 'bar' within MyModule
"; print "Testing, ResourcePath: ".$self->{ResourcePath}."
"; print "Testing, AssignedVal: ".$self->{AssignedVal}."
"; return; } sub browserEnv(){ my $self = shift; my $cgi = new CGI; if($cgi->http('HTTP_REFERER')){ print "Testing, there was a referer: ".$cgi->http('HTTP_REFERER')."
"; }else{ print "Testing, there was no referer
"; } return; } 1;