Seems very odd but try
BEGIN { package main; sub test{ return scalar localtime; } } use Mypackage; sub { print "OK"; return [200, ["Content-Type"=>"text/html" ],[Mypackage::test2()]]; };
pojpackage Mypackage; sub test2 { ::test(); } 1;
In reply to Re: Call subroutine of main namespace from package in Plack
by poj
in thread Call subroutine of main namespace from package in Plack
by Thenothing
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |