NAME
Sub::Multi::Tiny::Util - Internal utilities for Sub::Multi::Tiny
SYNOPSIS
No user-serviceable parts inside. See Sub::Multi::Tiny.
FUNCTIONS
_croak
As "croak" in Carp, but lazily loads Carp.
_carp
As "carp" in Carp, but lazily loads Carp.
_line_mark_string
Add a #line
directive to a string. Usage:
my $str = _line_mark_string <<EOT ;
$contents
EOT
or
my $str = _line_mark_string __FILE__, __LINE__, <<EOT ;
$contents
EOT
In the first form, information from caller
will be used for the filename and line number.
The #line
directive will point to the line after the _line_mark_string
invocation, i.e., the first line of <C$contents>. Generally, $contents
will be source code, although this is not required.
$contents
must be defined, but can be empty.
AUTHOR
Chris White <cxw@cpan.org>
LICENSE
Copyright (C) 2019 Chris White <cxw@cpan.org>
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.