[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[no subject]



I've created this function in my perl object:

sub _die {
  my ($self, $message) = @_;
  $! = $message;
  return undef;
}

I use it like this:

sub connect {
	my $self = shift;
	my $s = IO::Socket:INET->new(....)
		or return $self->_die("connect $!");
}


</pre>
<!--X-Body-of-Message-End-->
<!--X-MsgBody-End-->
<!--X-Follow-Ups-->
<hr>
<ul><li><strong>Follow-Ups</strong>:
<ul>
<li><strong><a name="00958" href="msg00958.html">[ale] perl $!</a></strong>
<ul><li><em>From:</em> pizza at shaftnet.org (Stuffed Crust)</li></ul></li>
</ul></li></ul>
<!--X-Follow-Ups-End-->
<!--X-References-->
<!--X-References-End-->
<!--X-BotPNI-->
<ul>
<li>Prev by Date:
<strong><a href="msg00949.html">[ale] ftp.ale.org</a></strong>
</li>
<li>Next by Date:
<strong><a href="msg00951.html">[ale] &quot;Hardware&quot; modem</a></strong>
</li>
<li>Previous by thread:
<strong><a href="msg00947.html">[ale] (OT) cwrsync XP USB drive</a></strong>
</li>
<li>Next by thread:
<strong><a href="msg00958.html">[ale] perl $!</a></strong>
</li>
<li>Index(es):
<ul>
<li><a href="maillist.html#00950"><strong>Date</strong></a></li>
<li><a href="threads.html#00950"><strong>Thread</strong></a></li>
</ul>
</li>
</ul>

<!--X-BotPNI-End-->
<!--X-User-Footer-->
<!--X-User-Footer-End-->
</body>
</html>