I wanted to build an awesome place for people to discuss module specific issues, but I don't have any more time for this, and there are much better places to discuss Perl-related issues. I'd recommend asking your question on Stack Overflow or on Perl Monks.
If you are looking for a Perl tutorial or Perl-related news, I hope these links will serve you well.
Posted on 2008-06-24 17:02:21-07 by jdhedden in response to 8148
Re: Question about multi-field object tests in :Init
The proper way is to create an appropriate Exception::Class class that subclasses OIO:
package Foo; { use Object::InsideOut; use Exception::Class ( 'Foo::Err' => { 'isa' => 'OIO', 'description' => q/Bad 'Foo' thing happened/, } ); sub _init :Init { Foo::Err->die('message' => q/Your 'Foo' is bad/); } } package main; my $obj = Foo->new('arg' => 'bar');
See the DIAGNOSTICS section of the POD for how to trap such errors. And, of course, read about Exception::Class.
Direct Responses: 8157 | Write a response