You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@perl.apache.org by Fred Moyer <fr...@redhotpenguin.com> on 2009/04/05 20:57:58 UTC

Problems in Makefile.PL determining installed Apache* module version

In my Makefile.PL I have:

    VERSION_FROM => 'lib/SL/Apache/App.pm',
    PREREQ_PM    => {
        'Apache::Reload'      => 0.10,
        'Apache2::Dispatch'    => 0.11,

Running 'perl Makefile.PL' I get:

phred@pooky ~/dev/svn/sl/trunk/SL-App $ perl Makefile.PL
generating script t/TEST
Warning: prerequisite Apache2::Dispatch 0.11 not found.

In Apache2::Dispatch I have:

package Apache2::Dispatch;
use strict;
use warnings;
our $VERSION = '0.11';
use mod_perl2 1.99023;
use Apache2::Const -compile => qw(OK DECLINED SERVER_ERROR);
use Apache2::Log         ();
use Apache2::Module      ();
use Apache2::RequestRec  ();
use Apache2::RequestUtil ();
use Apache::Dispatch::Util;
push @Apache2::Dispatch::ISA, qw(Apache::Dispatch::Util);
# Initialize the directives
my $directives = __PACKAGE__->directives();
Apache2::Module::add(__PACKAGE__, $directives);

And when I try to load the module from the command line:

phred@pooky ~/dev/svn/sl/trunk/SL-App $ perl -MApache2::Dispatch -e
'print $Apache2::Dispatch::VERSION'
Undefined subroutine &Apache2::Module::add called at
/Users/phred/dev/perl/lib/site_perl/5.8.8/Apache2/Dispatch.pm line 26.
Compilation failed in require.
BEGIN failed--compilation aborted.

Any ideas where to go from here?

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org


Re: Problems in Makefile.PL determining installed Apache* module version

Posted by Randy Kobes <ra...@gmail.com>.
On Sun, Apr 5, 2009 at 1:57 PM, Fred Moyer <fr...@redhotpenguin.com> wrote:
> In my Makefile.PL I have:
>
>    VERSION_FROM => 'lib/SL/Apache/App.pm',
>    PREREQ_PM    => {
>        'Apache::Reload'      => 0.10,
>        'Apache2::Dispatch'    => 0.11,
>
> Running 'perl Makefile.PL' I get:
>
> phred@pooky ~/dev/svn/sl/trunk/SL-App $ perl Makefile.PL
> generating script t/TEST
> Warning: prerequisite Apache2::Dispatch 0.11 not found.
>
> In Apache2::Dispatch I have:
>
> package Apache2::Dispatch;
> use strict;
> use warnings;
> our $VERSION = '0.11';
> use mod_perl2 1.99023;
> use Apache2::Const -compile => qw(OK DECLINED SERVER_ERROR);
> use Apache2::Log         ();
> use Apache2::Module      ();
> use Apache2::RequestRec  ();
> use Apache2::RequestUtil ();
> use Apache::Dispatch::Util;
> push @Apache2::Dispatch::ISA, qw(Apache::Dispatch::Util);
> # Initialize the directives
> my $directives = __PACKAGE__->directives();
> Apache2::Module::add(__PACKAGE__, $directives);
>
> And when I try to load the module from the command line:
>
> phred@pooky ~/dev/svn/sl/trunk/SL-App $ perl -MApache2::Dispatch -e
> 'print $Apache2::Dispatch::VERSION'
> Undefined subroutine &Apache2::Module::add called at
> /Users/phred/dev/perl/lib/site_perl/5.8.8/Apache2/Dispatch.pm line 26.
> Compilation failed in require.
> BEGIN failed--compilation aborted.
>
> Any ideas where to go from here?

I think the reason for the "Warning: prerequisite Apache2::Dispatch
0.11 not found." warning is related to the last error about not being
able to use Apache2::Module from the command line. This is because
Apache2::Module needs to be used within an apache process.

For the prerequisite problem, one approach might be to create (or use)
another module within the Apache2-Dispatch distribution that can be
used outside of apache, and specify that as the prerequisite.

-- 
best regards,
Randy

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@perl.apache.org
For additional commands, e-mail: dev-help@perl.apache.org