hello folks,

I'm trying to create a .pl using Inline::Java that closely mirrors the .js 
equivalent implementation.

In .js we can alias the namespace for shorter names via: -
    importPackage(Packages.abc.def.ghi.scripting)
    importPackage(Packages.abc.def.ghi.scripting.logging)
    script = new ScriptingEnvironment()    // equiv of 
Packages.abc.def.ghi.scripting.ScriptingEnvironment
    script.traceSetFileLevel(TraceLevel.ALL)   // equiv of 
Packages.abc.def.ghi.scripting.logging.TraceLevel.ALL

Was hoping I could do same in perl via typeglobs i.e. something like: -
    *traceLevel = "main::abc::def::ghi::scripting::logging::TraceLevel";     # 
implicit runtime glob
    $script->traceSetFileLevel($traceLevel::ALL);

But I cant get anything like above to work. Only the full expansion in the 
function param works i.e.
$dss->traceSetFileLevel($main::abc::def::ghi::scripting::logging::TraceLevel::ALL);

I'm wondering if its a lost cause because the API expects a 
java.lang.String?....hopefully not! 

Any inputs much appreciated.

Thanks, Alan

Reply via email to