Re: Packaging a CGI with modules?
On Fri, Jul 06, 2007 at 11:27:04AM +0300, Damyan Ivanov wrote:
> -=| MJ Ray, Fri, 06 Jul 2007 08:54:52 +0100 |=-
>
> > What is the recommended way to package a CGI with its own modules?
>
> Here's how I'd do it. This is my personal experience. Other pkg-perl
> members are welcome to share theirs :)
>
> > As well as having ITP'd koha, I am an upstream developer of it.
> > Upstream, I am setting WriteMakefile()'s PM to move the files into
> > good locations - for example, I'm currently putting the CGIs in
> > $(INST_LIB)/koha/cgi-bin - and I intend to mv them with debian/rules
> > to meet policy. Is that the best MakeMaker-definable location for
> > them to start in?
>
> Sure. koha/cgi-bin for the CGIs, koha/lib for the modules (*.pm).
Why not /usr/lib/cgi-bin, the designated place for CGI scripts?
(this is what I do for openguides).
> This way one would be able to "make INST_LIB=debian/tmp", right?
>
> If there is some way to put custom path in CGIs' @INC, the IMO correct
> place for the modules is /usr/share/koha/lib. If it is troublesome to
> get that path in @INC, then install them in /usr/share/perl5/
I'm not sure I agree with this either. They are perl modules; assuming
there's no chance they will conflict with another package containing the
same modules, why should they not live in /usr/{share,lib}/perl5, the
designated place for them? (this is what I do for openguides)
Cheers,
Dominic.
--
Dominic Hargreaves | http://www.larted.org.uk/~dom/
PGP key 5178E2A5 from the.earth.li (keyserver,web,email)
Reply to: