in reply to Call subroutine of main namespace from package in Plack
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;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Call subroutine of main namespace from package in Plack
by Thenothing (Sexton) on Apr 11, 2018 at 15:31 UTC | |
by Your Mother (Archbishop) on Apr 11, 2018 at 16:23 UTC | |
by stevieb (Canon) on Apr 11, 2018 at 21:56 UTC | |
by AnomalousMonk (Archbishop) on Apr 11, 2018 at 16:41 UTC |