Embperl
view release on metacpan or search on metacpan
#######################################################################################
sub Execute
{
my $_ep_param = shift ;
local $SIG{__WARN__} = \&Warn ;
# when called inside a Embperl Request, Execute the component only
return Embperl::Req::ExecuteComponent ($_ep_param, @_) if ($req && $Embperl::coro_req == $Coro::current) ;
$_ep_param = { inputfile => $_ep_param, param => [@_]} if (!ref $_ep_param) ;
local $req_rec ;
if ($modperl && !exists ($_ep_param -> {req_rec}))
{
eval
{
if ($modperlapi < 2)
{
elsif (exists ($_ep_param -> {req_rec}) && defined ($_ep_param -> {req_rec}))
{
$req_rec = $_ep_param -> {req_rec} ;
}
my $eplguard ;
if (defined ($Coro::current))
{
# make sure that there is only one request at the same time
$Embperl::coro_semaphore ||= Coro::Semaphore -> new (1) ;
$eplguard = $Embperl::coro_semaphore -> guard ;
$Embperl::coro_req = $Coro::current ;
}
my $_ep_rc ;
{
$_ep_rc = Embperl::Req::ExecuteRequest (undef, $_ep_param) ;
}
undef $eplguard ;
return $_ep_rc ;
}
( run in 0.321 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )