CGI-Simple
view release on metacpan or search on metacpan
lib/CGI/Simple.pm view on Meta::CPAN
12221223122412251226122712281229123012311232123312341235123612371238123912401241}
################# cgi-lib.pl Compatibility Methods #################
# Lightly GOLFED but the original functionality remains. You can call
# them using either: # $q->MethodName or CGI::Simple::MethodName
sub
_shift_if_ref {
shift
if
ref
$_
[0] eq
'CGI::Simple'
}
sub
ReadParse {
my
$q
=
&_shift_if_ref
|| CGI::Simple->new;
my
$pkg
=
caller
();
no
strict
'refs'
;
*in
=
@_
?
$_
[0]
: *{
"${pkg}::in"
};
# set *in to passed glob or export *in
%in
=
$q
->Vars;
$in
{
'CGI'
} =
$q
;
return
scalar
%in
;
}
lib/CGI/Simple/Standard.pm view on Meta::CPAN
535455565758596061626364656667686970717273
_store_globals _reset_globals)
]
);
# BEGIN {
# $SIG{__DIE__} = sub { croak "Undefined Method : @_\n" }
# }
sub
import
{
my
(
$self
,
@args
) =
@_
;
my
$package
=
caller
();
my
(
%exports
,
%pragmas
);
for
my
$arg
(
@args
) {
$exports
{
$arg
}++,
next
if
$arg
=~ m/^\w+$/;
$pragmas
{
$arg
}++,
next
if
$arg
=~ m/^-\w+$/;
if
(
$arg
=~ m/^:[-\w]+$/ ) {
if
(
exists
$EXPORT_TAGS
{
$arg
} ) {
my
@tags
= @{
$EXPORT_TAGS
{
$arg
} };
for
my
$tag
(
@tags
) {
my
@expanded
=
exists
$EXPORT_TAGS
{
$tag
}
( run in 0.255 second using v1.01-cache-2.11-cpan-d6f9594c0a5 )