B
badarisj
folks,
in our perl programs we have bunch of 'use <pkg>' that load bunch of
module
to perform the actual function of the program.
But when the user specifies
a simple '-help', it is annoying for the users to have perl program
load everything
and then spit out the help message. so couple of questions:
- is there anything like 'delayed use' ?
- may be i could place the 'use <pkg>' statements
of the modules not related displaying help message inside an 'eval'
so that perl would
load those modules only when help is not specified.
- probably we could go back to use of 'require <file>' ; but that
would have caveat that
we may miss the non-presence of a certain module loaded only under
certain circumstance.
just curious as to if others faced similar problem and how they
addressed it.
thanks,
-badari
in our perl programs we have bunch of 'use <pkg>' that load bunch of
module
to perform the actual function of the program.
But when the user specifies
a simple '-help', it is annoying for the users to have perl program
load everything
and then spit out the help message. so couple of questions:
- is there anything like 'delayed use' ?
- may be i could place the 'use <pkg>' statements
of the modules not related displaying help message inside an 'eval'
so that perl would
load those modules only when help is not specified.
- probably we could go back to use of 'require <file>' ; but that
would have caveat that
we may miss the non-presence of a certain module loaded only under
certain circumstance.
just curious as to if others faced similar problem and how they
addressed it.
thanks,
-badari