Alien-ROOT
view release on metacpan or search on metacpan
inc/inc_Locale-Maketext-Simple/Locale/Maketext/Simple.pm view on Meta::CPAN
$args{Class} ||= caller;
$args{Style} ||= 'maketext';
$args{Export} ||= 'loc';
$args{Subclass} ||= 'I18N';
my ($loc, $loc_lang) = $class->load_loc(%args);
$loc ||= $class->default_loc(%args);
no strict 'refs';
*{caller(0) . "::$args{Export}"} = $loc if $args{Export};
*{caller(0) . "::$args{Export}_lang"} = $loc_lang || sub { 1 };
}
my %Loc;
sub reload_loc { %Loc = () }
sub load_loc {
my ($class, %args) = @_;
my $pkg = join('::', grep { defined and length } $args{Class}, $args{Subclass});
inc/inc_Module-Build/Module/Build/Base.pm view on Meta::CPAN
}
sub log_debug {
my $self = shift;
print @_ if ref($self) && $self->debug;
}
sub log_warn {
# Try to make our call stack invisible
shift;
if (@_ and $_[-1] !~ /\n$/) {
my (undef, $file, $line) = caller();
warn @_, " at $file line $line.\n";
} else {
warn @_;
}
}
# install paths must be generated when requested to be sure all changes
# to config (from various sources) are included
sub _default_install_paths {
inc/inc_Module-Load/Module/Load.pm view on Meta::CPAN
### on perl's before 5.10 (5.9.5@31746) if you require
### a file in VMS format, it's stored in %INC in VMS
### format. Therefor, better unixify it first
### Patch in reply to John Malmbergs patch (as mentioned
### above) on p5p Tue 21 Aug 2007 04:55:07
$file = VMS::Filespec::unixify($file) if $^O eq 'VMS';
return $file;
}
sub _who { (caller(1))[0] }
sub _is_file {
local $_ = shift;
return /^\./ ? 1 :
/[^\w:']/ ? 1 :
undef
#' silly bbedit..
}
inc/inc_Params-Check/Params/Check.pm view on Meta::CPAN
sub _safe_eq {
### only do a straight 'eq' if they're both defined ###
return defined($_[0]) && defined($_[1])
? $_[0] eq $_[1]
: defined($_[0]) eq defined($_[1]);
}
sub _who_was_it {
my $level = $_[0] || 0;
return (caller(2 + $CALLER_DEPTH + $level))[3] || 'ANON'
}
=head2 last_error()
Returns a string containing all warnings and errors reported during
the last time C<check> was called.
This is useful if you want to report then some other way than
C<carp>'ing when the verbose flag is on.
inc/inc_Params-Check/Params/Check.pm view on Meta::CPAN
=head2 $Params::Check::WARNINGS_FATAL
If set to true, L<Params::Check> will C<croak> when an error during
template validation occurs, rather than return C<false>.
Default is 0;
=head2 $Params::Check::CALLER_DEPTH
This global modifies the argument given to C<caller()> by
C<Params::Check::check()> and is useful if you have a custom wrapper
function around C<Params::Check::check()>. The value must be an
integer, indicating the number of wrapper functions inserted between
the real function call and C<Params::Check::check()>.
Example wrapper function, using a custom stacktrace:
sub check {
my ($template, $args_in) = @_;
inc/inc_version/version.pm view on Meta::CPAN
map { $args{$_} = 1 } @_
}
else { # no parameters at all on use line
%args =
(
qv => 1,
'UNIVERSAL::VERSION' => 1,
);
}
my $callpkg = caller();
if (exists($args{declare})) {
*{$callpkg."::declare"} =
sub {return $class->declare(shift) }
unless defined(&{$callpkg.'::declare'});
}
if (exists($args{qv})) {
*{$callpkg."::qv"} =
sub {return $class->qv(shift) }
( run in 0.263 second using v1.01-cache-2.11-cpan-b61123c0432 )