CGI-apacheSSI
view release on metacpan or search on metacpan
lib/CGI/apacheSSI.pm view on Meta::CPAN
232425262728293031323334353637383940414243use
Date::Format;
use
Cwd;
our
$VERSION
=
'0.96'
;
our
$DEBUG
= 0;
sub
import
{
my
(
$class
,
%args
) =
@_
;
return
unless
exists
$args
{
'autotie'
};
$args
{
'filehandle'
} =
$args
{
'autotie'
} =~ /::/ ?
$args
{
'autotie'
} :
caller
().
'::'
.
$args
{
'autotie'
};
no
strict
'refs'
;
my
$self
=
tie
(*{
$args
{
'filehandle'
}},
$class
,
%args
);
return
$self
;
}
my
(
$gmt
,
$loc
,
$lmod
);
# NOTE: check for escaped \( or \), what should it do? -- DONE?
our
$L
;
# used to return the brackets count
our
$RE_parens_2C
= qr/
lib/CGI/apacheSSI.pm view on Meta::CPAN
143144145146147148149150151152153154155156157158159160161162163
my
$self
=
shift
;
$self
->{
'_config'
}->{
'_enable_exec_cmd'
} =
$_
[0];
}
sub
TIEHANDLE {
my
(
$class
,
%args
) =
@_
;
my
$self
=
$class
->new(
%args
);
$self
->{
'_handle'
} =
do
{
local
*STDOUT
};
my
$handle_to_tie
=
''
;
if
(
$args
{
'filehandle'
} !~ /::/) {
$handle_to_tie
=
caller
().
'::'
.
$args
{
'filehandle'
};
}
else
{
$handle_to_tie
=
$args
{
'filehandle'
};
}
open
(
$self
->{
'_handle'
},
'>&'
.
$handle_to_tie
) or
die
"Failed to copy the filehandle ($handle_to_tie): $!"
;
return
$self
;
}
sub
PRINT {
my
$self
=
shift
;
{
$self
->{
'_handle'
}}
map
{
$self
->process(
$_
) }
@_
;
( run in 0.332 second using v1.01-cache-2.11-cpan-0f795438458 )