Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options

Re: Name spaces and Perl::Tk coding style

by strat (Canon)
on Oct 06, 2005 at 07:35 UTC ( #497839=note: print w/replies, xml ) Need Help??

in reply to Name spaces and Perl::Tk coding style

For my Tk-Apps, I often use package/module names like (if my App is called MyApp):

  • MyApp::Widgets: little wrapper around widgets with some defaults (e.g. background, font, ...) to be able to get a flexible layout and shorter widget calls. Some enhanced widgets (e.g. with Tk::Derived) may be specified here as well if the code is short, although then there is more than one package in a module...
  • MyApp::Forms: most of the GUI functionality is coded here to separate layout and code as far as possible
  • MyApp::Callbacks: callbacks are specified here; if necessary, there even may be more modules grouped by topic)
  • MyApp::DB: the interface to Databases, or MyApp::LDAP as interface to Directory Services, ... so I don't need to search through the whole program if the interface changes
  • maybe MyApp::Config: this sometimes contains the configuration in global package variables which I treat as readonly, sometimes as configuration objects or an interface to an external configuration
  • sometimes MyApp::Global for saving global variables like $Mw, $ToplevelEdit, ...

Best regards,
perl -e "s>>*F>e=>y)\*martinF)stronat)=>print,print v8."

  • Comment on Re: Name spaces and Perl::Tk coding style

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://497839]
[Discipulus]: how I can tell in which perl version was included List::Util 1.29 ?
[Discipulus]: to specify use 5.0.x to be sure to have pairmap from the module..
[Corion]: Discipulus: I think Module::Corelist ( or corelist ) can tell you that
[Corion]: Meh - Module::CoreList
[choroba]: Just use List::Util 1.29
[choroba]: Be kind to people using old Perl with newer version of the module
[Corion]: But why not simply specify 'List::Util' => 1.29 in your prerequisites? People might install a more recent version of the module into their Perl
[Corion]: (what choroba said)

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (6)
As of 2017-05-25 09:19 GMT
Find Nodes?
    Voting Booth?