Stas Bekman wrote:
> Ted Prah wrote:
> > Thanks Drew, I tried that, but it did not work.
>
> What happends if you add:
>
> PerlWarn On
>
> in httpd.conf
>
> or
>
> start the script with perl -w?
>
> any warnings?
>
I had PerlWarn On and added -w anyway, but there were no errors.
>
> do you test only this script alone? What happens if you add the package
> declaration and then call it using the full name? e.g.:
>
Yes, this is the only script (and corresponding library file) that I use
for this test. When I use the package declaration and make the call
using the full name, the reloads work fine.
The reason I am using the library file is to follow your recommendation
in the mod_perl guide where a script is split into two files to avoid
the nested subroutine problem. Out of curiosity I tested the sample
code (counter.pl and mylib.pl) and they too did not reload properly
when mylib.pl was modified. Does the reloading of a modification
of mylib.pl work for you? I would prefer to use the library file
approach as opposed to the package approach as a lot of our code
uses libraries that are not in packages, but will move to packages if
that is a necessity.
Thank you, I really appreciate your help.
>
> z.pl - test script which calls entry_point in z_lib.pl
> -------------------------------------------------------
> #!/usr/local/bin/perl -w
> use strict;
>
> require '/home/cgi-bin/z_lib.pl';
>
> My::Z::entry_point();
> -------------------------------------------------------
>
> z_lib.pl
> ----------------------
> package My::Z;
> use strict;
>
> sub entry_point {
>
> my $r = Apache->request;
> $r->content_type('text/html');
> $r->send_http_header;
>
> print "HERE 1";
> #print " HERE 2";
>
> }
>
> > Ted
> >
> > Drew Taylor wrote:
> >
> >
> >>Have you tried moving the PerlInitHandler & PerlSetVar up and out of the
> >><Location> directive, making it global for the server? I'm not sure that
> >>would fix it, but it's worth a try.
> >>
> >>Drew
> >>
> >>At 02:37 PM 5/17/02 -0400, Ted Prah wrote:
> >>
> >>>I have tried Apache::Reload as well, but I get the same results.
> >>>
> >>>Ted
> >>>
> >>>Drew Taylor wrote:
> >>>
> >>>
> >>>>Take a look at Apache::Reload or Apache::StatINC. Reload is more flexible,
> >>>>but StatINC has been around a little longer. Both have worked well for me.
> >>>>But be sure that you don't use these modules on a production server. :-)
> >>>>
> >>>>httpd.conf
> >>>>==========
> >>>>PerlInitHandler Apache::Reload
> >>>>
> >>>>Drew
> >>>>
> >>>>At 01:38 PM 5/17/02 -0400, Ted Prah wrote:
> >>>>
> >>>>>Hi,
> >>>>>
> >>>>>I am new to mod_perl and am having problems seeing the
> >>>>>changes made to library files. Must I restart the server every
> >>>>>time I change a library file in order to see my changes? My
> >>>>>test code and environment is below.
> >>>>
> >>======================================================================
> >>Drew Taylor | Freelance web development using
> >>http://www.drewtaylor.com/ | perl/mod_perl/MySQL/postgresql/DBI
> >>mailto:[EMAIL PROTECTED] | Email jobs at drewtaylor.com
> >>----------------------------------------------------------------------
> >>Speakeasy.net: A DSL provider with a clue. Sign up today.
> >>http://www.speakeasy.net/refer/29655
> >>======================================================================
> >
> >
> > --
> > Ted Prah
> > NetCasters, Inc.
> > Phone: 978.887.2100 x44
> > Fax: 978.887.6750
> > [EMAIL PROTECTED]
> >
>
> --
>
> __________________________________________________________________
> Stas Bekman JAm_pH ------> Just Another mod_perl Hacker
> http://stason.org/ mod_perl Guide ---> http://perl.apache.org
> mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com
> http://modperlbook.org http://apache.org http://ticketmaster.com
--
Ted Prah
NetCasters, Inc.
Phone: 978.887.2100 x44
Fax: 978.887.6750
[EMAIL PROTECTED]