in reply to Error.pm not playing nicely with objects?

Dear monks, can anyone enlighten me as to why the exception in the example below is not caught by the bottom catch block?

Because you aren't importing the try subroutines into your foo package :-)

Add another  use Error qw(:try); after your package foo and it should work.

Replies are listed 'Best First'.
Re^2: Error.pm not playing nicely with objects?
by Anonymous Monk on Feb 03, 2006 at 14:04 UTC
    thanks so much! i've spent hours and hours trying to figure this out. you're a star!!!