SPUG: Tracing back to a calling sub
Andrew Sweger
andrew at sweger.net
Mon Jan 24 20:23:17 PST 2005
On Mon, 24 Jan 2005, Peter Darley wrote:
> sub MySub
> {
> my (%Args) = @_;
> # Args: Query = The query to run the Lookup on
>
> if (! $Args{Query}) {die "A null querry was passed to MySub from
> $Calling_Sub!"}
>
> ...
> }
See also:
use Carp; # perldoc Carp
if (...) {
confess "Received null query";
}
--
Andrew B. Sweger -- The great thing about multitasking is that several
things can go wrong at once.
More information about the spug-list
mailing list