Bugzilla #! perl location changing

PPrymmer at factset.com PPrymmer at factset.com
Wed Mar 12 15:17:05 UTC 2003


Could someone explain why $Config{startperl} extraction
is not used for the tops of the files?  That is why have any
hard coded, possibly incorrect path?  Note that h2ph and
h2xs in the perl distrbution are extract from h2ph.PL and
h2xs.PL respectively.  It is my understanding that bugzilla
will be moving toward a Makefile.PL based installation.
Within a Makefile.PL it is even easier to do .PL extraction
provided the hash passed to WriteMakefile() has an
entry 'EXE_FILES' that points to an array ref.  To make the
example explicit you could have this set up (assuming
that the index.PL file will become index.cgi and it is in
the same directory as the Makefile.PL):

WriteMakefile(
# other stuff
    'EXE_FILES'         => [("index.cgi")],
# even more hash elements
);

Then the file 'index.PL' that ships with the tar ball can
be written with a simple wrapper like so:

   use Config;
   use File::Basename qw(basename dirname);
   use Cwd;
   my $origdir = cwd;
   chdir dirname($0);
   my $file = basename($0, '.PL');
   $file .= '.cgi';
   open OUT,">$file" or die "Can't create $file: $!";
   print OUT <<"!GROK!THIS!";
   $Config{startperl}
   !GROK!THIS!
   print OUT <<'!NO!SUBS!';

   # original content of index.cgi excluding top #! line

   !NO!SUBS!

That avoids a hard coded #!/path altogether and
takes the one specified in Config.pm for the
perl that is used to run the initial:

    perl Makefile.PL

installation step.

Peter Prymmer



                                                                                                                           
                      David Miller                                                                                         
                      <justdave at syndicom         To:      mozilla-webtools at mozilla.org, developers at bugzilla.org            
                      m.com>                     cc:                                                                       
                      Sent by:                                                                                             
                      developers-owner at b         Subject: Bugzilla #! perl location changing                               
                      ugzilla.org                                                                                          
                                                                                                                           
                                                                                                                           
                      03/11/2003 07:18                                                                                     
                      PM                                                                                                   
                      Please respond to                                                                                    
                      developers                                                                                           
                                                                                                                           
                                                                                                                           



I wanted to issue a heads-up to everyone that we're going to be changing
the default perl path on all Bugzilla files from /usr/bonsaitools/bin/perl
to /usr/bin/perl sometime in the next few days.  This has been a much
sought-after change for a long time, and the main roadblock to doing so
before have been objections from mozilla.org.  Those objections have been
alleviated by other means now, so we can change it without them giving us a
hassle over it now. :)

See http://bugzilla.mozilla.org/show_bug.cgi?id=196433 for details.

If you're using a CVS copy of Bugzilla and actually have more than one perl
on your machine, and your bonsaitools symlink happens to point at something
other than /usr/bin/perl, then this will probably affect you.  I suspect
that's a very small percentage of folks though. :)
--
Dave Miller      Project Leader, Bugzilla Bug Tracking System
http://www.justdave.net/             http://www.bugzilla.org/
----
To view or change your list settings, click here:
<http://bugzilla.org/cgi-bin/mj_wwwusr?user=pprymmer@factset.com>







More information about the developers mailing list