Quote:
As a simple fix, try: Module->Subroutine("input");
instead. This will get treated like a class method.
It's then probably worth pointing out too that the class name gets passed in as the first argument to "Subroutine" so he'll need:
Code:
sub Subroutine { shift;
my $input = shift;
To get rid of the class or:
Code:
sub Subroutine { my $class = shift;
my $input = shift;
if ($input eq "something") {
$class->error();
}
.....to save it and be able to call other class methods.