NAME
Dpchrist::Base::_tag - provides _tag() subroutine
SYNOPSIS
See example/_tag.t in distribution tree:
#! /usr/bin/perl
use strict;
use warnings;
use Dpchrist::Base::_tag;
sub foo
{
return ( "in foo:\n",
"\t_tag(0) returns '", _tag(0), "'\n",
"\t_tag(1) returns '", _tag(1), "'\n",
"\t_tag(2) returns '", _tag(2), "'\n",
);
}
print("in main:\n",
"\t_tag(0) returns '", _tag(0), "'\n",
"\t_tag(1) returns '", _tag(1), "'\n",
"\t_tag(2) returns '", _tag(2), "'\n",
foo(),
);
Sample run:
2009-10-30 20:53:30 dpchrist@vmlamp ~/Dpchrist-Base-_tag/example
$ perl _tag.pl
in main:
_tag(0) returns 'undef _tag.pl 17 '
_tag(1) returns 'undef undef undef '
_tag(2) returns 'undef undef undef '
in foo:
_tag(0) returns 'main::foo _tag.pl 10 '
_tag(1) returns 'undef _tag.pl 17 '
_tag(2) returns 'undef undef undef '
EXPORT
_tag
_tag EXPR
Returns a string suitable for tagging debug, log, warning, error,
and other messages.
If EXPR is 0, tag corresponds to location where _tag() is called.
If EXPR is a positive integer, _tag() goes back EXPR stack frames.
INSTALLATION
perl Makefile.PL
make
make test
make install
DEPENDENCIES
Perl 5.10.0
feature
AUTHOR
David Paul Christensen dpchrist@holgerdanske.com
COPYRIGHT AND LICENSE
Copyright (C) 2009 by David Paul Christensen
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2.
This program is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
USA.