Perl offers various ways to share/reuse code. When enhancing perl code/modules used in multiple applications and/or parallel releases, it is important to ensure that we get an early warning if the change made is not backward compatible and if there is a potential for the existing applications to break. With “use” we would know if a reference is made to an unavailable module at compile time itself. However, there are cases, when we need to be backward compatible and allow the existing applications that share code to function seamlessly. Using “require” instead of “use” has come in handy to ensure that the existing applications continue to work and at the same time allow the new releases to use the new functionality. This is because “require” is more dynamic and loads the modules at run time when needed and not at compile time unlike “use”.
Hi, I am trying to use a perl script like the following : main.pl: require "abc.pl"; print "In parent script\n"; abc.pl: print "In abc.pl script\n"; I have some perl options set in PERL5OPT, which work fine for main.pl but not for abc.pl. This is how my Perl5OPT looks: PERL5OPT="-I<lib_path_to_Devel::Cover> -MDevel::Cover=-db,cover_db,+ignore,.*5\.10\.0.*,-merge,on,-coverage,statement,-silent,on" I have compared the output of perl -V($^X -V) in both these cases, and they are exactly identical. I am not sure what is missing here. I don't have a control over changing the "require" to "use", as it is prodduct code written by someone else, and I am only trying to run them with the PERL5OPT set by me. Really appreciate any help in this regard. Thanks & Regards, Vaishnavi. Thread Next- Perl "require" and PERL5OPT by vaishnavi krishnan
- Re: Perl "require" and PERL5OPT by Paul Johnson
Relevant pages:
- Alice Temperley Dress
Shop the latest Alice by Temperley day dresses handpicked by a global community of independent trendsetters and stylists.
- Reading A File In Perl
- Concatenate Strings In Perl
- Aim Hyperlink Commands
Sport Icons Below will be a list of commands of what AIM carrys. They are mostly used in chat rooms though. Do you have an AIM command that you found out about or that we ...
- Perltk Mac Os X




