in reply to packages within packages
the script that uses the packages looks like this:
So I'm trying to "bring" the DeployException, RemoteException and WineException into the same namespace? as the rest. Now it will not print "chinup"; rather stopping at the RemoteException clause.use Error qw(:try); use RemoteException; try { somefunction(1); } catch DeployException with { my $ex = shift; print "wibble\n"; } catch RemoteException with { my $ex = shift; print "dibble\n"; } catch WineException with { my $ex =shift; print "chinup\n"; }; sub somefunction { my $h =shift; throw WineException("hello world") if $h==1; return; }
Apologies, I now realise that I'm actually asking a question about Error.pm, not the use statement. Is there another package which is slightly more usable?
|
|---|