Hi again,

I'm having trouble seeing module changes when I reload
a script that uses it.  I'm using Apache::Reload and my test
script/module is as follows:


test.pl
--------------------
#!/usr/local/bin/perl
use strict;
use warnings;

use My::Test qw(:subs);

print "Content-type: text/plain\r\n\r\n";
&test1();
--------------------


Test.pm
--------------------
package My::Test;
use strict;
use warnings;

BEGIN {
    use Exporter ();

    our (@ISA, @EXPORT, @EXPORT_OK, %EXPORT_TAGS);

    @ISA       = qw(Exporter);
    @EXPORT    = qw();
    @EXPORT_OK = qw();

    %EXPORT_TAGS = (
                    subs => [qw(test1)],
                   );

    Exporter::export_ok_tags('subs');

}

sub test1 { print "In test1 func\n"; }

1;
--------------------


When I modify sub test1, and I reload - no changes appear
in the browser.  The following gets printed to error_log:
Subroutine test1 redefined at /export/home/httpd/cgi-bin/My/Test.pm line

22.

When I touch test.pl - the changes appear.  The following gets printed
to error_log:
Subroutine test1 redefined at /export/home/httpd/cgi-bin/My/test.pl line

5

Finally, if I add a new subroutine test2 to Test.pm, export it, and
update the test.pl script to call test2, the script fails with an
Internal
Server Error.  The following gets printed to error_log:
"test2" is not exported by the My::Test module at
/export/home/httpd/cgi-bin/My/test.pl line 5
[Wed May 22 15:26:12 2002] [error] Can't continue after import errors at

/export/home/httpd/cgi-bin/My/test.pl line 5
BEGIN failed--compilation aborted at /export/home/httpd/cgi-bin/
My/test.pl line 5.

Then, when I restart the server, the script runs fine.

Thank you for any help you can provide,

Ted


Reply via email to