linux - It is possible to load list perl modules depending on conditional statements? -


this question has answer here:

(correct me if ask question in wrong way).

i making standard/generic way simplify scripts/app making in linux using perl.

i found solution make standard sub routines , calling them file of standard jobs want have (variable declarations/checkers/etc).

now last problem have how call different set of modules(tk, dbi, etc..) need calling them file. not that. made flags activate contents standard/generic sub routines, want conditions applied when activating list of modules based on flag.

meaning based on flag declared, list of modules needs activated activated.

how that? :)


additional details.

not modules made using .pm, perl modules like:

use net::domain qw(hostname hostfqdn hostdomain); use time::local; use time::piece; use switch; use exporter; #use strict;  use file::basename; use data::dumper qw(dumper);  use time::local;                                       use time::piece; use time::seconds();                                       use tk; use tk::browseentry; use tk::balloon;                                  use tk::widgets qw(checkbutton browseentry);           use tk::notebook;                                      use tk::pane;    use tk::photo;       

you're free use 'require' evaluated when control reaches in runtime - unlike 'use's getting extracted in begin { }.


Comments

Popular posts from this blog

android - MPAndroidChart - How to add Annotations or images to the chart -

javascript - Add class to another page attribute using URL id - Jquery -

firefox - Where is 'webgl.osmesalib' parameter? -