in reply to Re: Dynamic package name (?!)
in thread Dynamic package name (?!)

I had a look on perlmod allready but unfortunatly i could not find something that even pointed in the right direction. I dont have problems with variable "Variable" names (even if u should not use them i know ;) but that variable package name syntax makes me barf :-P

P.S.: %::{"sy::"}{$packagename . '::}

just spits out tons of errors ending with :

syntax error at ./sy.x line 699, near "}{" syntax error at ./sy.x line 702, near "}" syntax error at ./sy.x line 714, near "}" syntax error at ./sy.x line 730, near "}" Execution of ./sy.x aborted due to compilation errors.

Replies are listed 'Best First'.
Re^3: Dynamic package name (?!)
by moritz (Cardinal) on Feb 07, 2011 at 15:24 UTC
    Sorry, the main symbol table is %::, but when accessing elements it needs to become a $. And of course the final quote needs to be finished too, so more like:
    $::{"sy::"}{$packagename . "::"}