First of all, thanks for your patience. Secondly, I still can't seem to get this going, I acted exactly as you said, created /usr/local/bin/MyErrors/SomeError.pm with the contents:
package MyErrors::SomeError;
use Error::Simple;
@ISA = qw(Error::Simple);
1;
Then I'v created /usr/local/bin/test.pl with the following contents:
#!/usr/bin/perl -w
use Error qw(:try);
use MyErrors::SomeError;
try {
throw MyErrors::SomeError('throwing SomeError exception');
} catch MyErrors::SomeError with {
my $err = shift;
print "caught it: $err->{'-text'}\n";
};
When I run test.pl I get the following error:
Can't locate MyErrors/SomeError.pm in @INC (@INC contains: /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0 /usr/lib/perl5/site_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/site_perl/5.8.0 /usr/lib/perl5/site_perl /usr/lib/perl5/vendor_perl/5.8.0/i386-linux-thread-multi /usr/lib/perl5/vendor_perl/5.8.0 /usr/lib/perl5/vendor_perl /usr/lib/perl5/5.8.0/i386-linux-thread-multi /usr/lib/perl5/5.8.0) at /usr/local/bin/test.pl line 4.
BEGIN failed--compilation aborted at /usr/local/bin/test.pl line 4.
It seems that it can't find SomeError.pm, sorry again for the troubling but do you see something wrong here?
Hotshot