Howdy folks,
Here's something I was wondering (and wondering why its never come up sooner for me ;p)
if I make a module, say Foobar.pm how do you make it so if a function returns false you can die $!; ?
package Foobar;
sub baz { return 1 if shift; # do what here to set $! = "You are not true"; properly, safely etc... ??? return 0; }
Foobar->baz(1) or die $!; # won't die Foobar->baz(0) or die $!; # will die with "You are not true"
TIA for any wisdom ;p
-- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn.perl.org/first-response>