Syntactic Confectionery Delight | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
I may be misreading the code, but it looks like you're trying to access the formats as if they were variables declared in your imported package, when they're actually being defined within a sub. You have two choices, depending on how you want to define your formats:
I'd probably go with '1' since there's nothing really happening that seems to require a sub.
I haven't tried compiling this and it's been a long time since I've worked with formats, so you might need to do some tweaks (I notice that in your code the last two lines use double-quotes to make the assignment, for instance), but this gives you a fairly flexible structure... have more Admin reports? Define a new package Formatting::Admin::Other::top. Want to have user reports? Formatting::User::Usage::top. And so on. HTH In reply to Re: Formats and Variable Scope
by jreades
|
|