hey,

the following small patch puts an environmental hook into PAR so us folks with
non-standard include schemes can instrument their code to be par-friendly..

Index: lib/App/Packer/Backend/PAR.pm
===================================================================
RCS file: /dbs/dat/cvs/mdss/lib/perl/lib/App/Packer/Backend/Attic/PAR.pm,v
retrieving revision 1.1.2.7
diff -c -r1.1.2.7 PAR.pm
*** lib/App/Packer/Backend/PAR.pm       25 Jan 2004 22:49:20 -0000      1.1.2.7
--- lib/App/Packer/Backend/PAR.pm       26 Jan 2004 00:41:58 -0000
***************
*** 97,102 ****
--- 97,104 ----
                                                        # exit gracefully and clean up 
after ourselves.
                                                        # note.. in constructor 
because of conflict.
  
+       $ENV{PAR_RUN} = 1;
+ 
        my $self = bless {}, $type;
  
        $self->set_args($args)  if ($args);


ie: it sets PAR_RUN so you can put conditionals in your program to do different
things in the case that PAR is running your script..

Ed

(
ps - I'd be interested in ideas on how to further customize Module::ScanDeps.
For example, I have a system call _require_system('name.pl') which looks at a 
hierarchy,
and includes files in the order:

unix/name.pl
unix/solaris/name.pl
unix/solaris/solaris-2.8/name.pl

so if you want to customize functions based on OS you can. I'd like to support this
in Module::ScanDeps, natively, so the static scanning can handle it..
)

Reply via email to