FAQ
Hi,

I'm building Catalyst application which depends on several CPAN
modules which I want to install automatically as part of the build
procedure of my application. To achieve this I put following lines in
my Makefile.PL:

requires 'Catalyst::Plugin::Session' => 0;

If the module enlisted there has unsatisfied dependencies, it doesn't
install them automatically nor at least ask for confirmation. For
example, C::P::Session module requires 2 CPAN modules:
Object::Signature and Test::Deep which aren't installed and build
procedure fails. Here is sample from the output:

===cut===================================================
CPAN.pm: Going to build M/MR/MRAMBERG/Catalyst-Plugin-Session-0.14.tar.gz

Checking if your kit is complete...
Looks good
Warning: prerequisite Object::Signature 0 not found.
Warning: prerequisite Test::Deep 0 not found.
Writing Makefile for Catalyst::Plugin::Session
---- Unsatisfied dependencies detected during
[M/MR/MRAMBERG/Catalyst-Plugin-Session-0.14.tar.gz] -----
Object::Signature
Test::Deep
Running make test
Delayed until after prerequisites
Running make install
Delayed until after prerequisites
*** Catalyst::Plugin::Session installation failed.
*** Module::AutoInstall installation finished.
======================================================

Would guys have any idea how to install a module with its dependencies?

-- Svi

Search Discussions

  • Jonathan Rockway at Feb 6, 2007 at 12:41 am

    On Monday 05 February 2007 15:22, Svilen Ivanov wrote:
    If the module enlisted there has unsatisfied dependencies, it doesn't
    install them automatically nor at least ask for confirmation. For
    example, C::P::Session module requires 2 CPAN modules:
    Object::Signature and Test::Deep which aren't installed and build
    Sounds like your CPAN config might be broken. What's prerequisites_policy
    set to in your CPAN config? (You can check by running the cpan shell and
    typing "o conf prerequisites_policy".) If it's not "yes", try setting it to
    yes and re-running make.

    If that doesn't work, it would be helpful if you provide the output of "o
    conf" and the log from typing "install Catalyst::Plugin::Session" in the CPAN
    shell.

    Regards,
    Jonathan Rockway

    --
    package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
    $,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
    ";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;
    -------------- next part --------------
    A non-text attachment was scrubbed...
    Name: not available
    Type: application/pgp-signature
    Size: 307 bytes
    Desc: not available
    Url : http://lists.scsys.co.uk/pipermail/catalyst/attachments/20070205/aee64c2f/attachment.pgp
  • Svilen Ivanov at Feb 6, 2007 at 7:21 am
    2007/2/6, Jonathan Rockway [...]
    Sounds like your CPAN config might be broken. What's prerequisites_policy
    set to in your CPAN config? (You can check by running the cpan shell and
    typing "o conf prerequisites_policy".) If it's not "yes", try setting it to
    yes and re-running make.
    It is set to 'ask':
    cpan> o conf prerequisites_policy
    prerequisites_policy ask

    Now I changed it to 'yes', still no luck (I tried another module -
    Test::Parser which needs few XML:: libs since I already installed
    C::P::Session from CPAN shell)
    If that doesn't work, it would be helpful if you provide the output of "o
    conf" and the log from typing "install Catalyst::Plugin::Session" in the CPAN
    shell.
    I needed to continue my work I installed Catalyst::Plugin::Session
    from CPAN shell - w/o any problems; it properly asked me to install
    the dependent modules as well.

    When I changed the policy to 'yes', CPAN shell no longer asks me to
    install deps - they are automaticly skipped:
    ================================================
    ---- Unsatisfied dependencies detected during
    [B/BR/BRYCE/Test-Parser-1.5.tar.gz] -----
    XML::Twig
    XML::Simple
    Chart::Graph::Gnuplot
    Ignoring dependencies on modules XML::Twig, XML::Simple, Chart::Graph::Gnuplot

    ================================================

    Then I tried to rebuild CPAN::Config - I deleted it and re-run cpan
    shell. I noticed that the option for "prerequisites_policy" may be
    "follow" instead of "yes" as it asked me:

    Policy on building prerequisites (follow, ask or ignore)? [ask]

    Anyway - I chose now 'follow' - now it installs automatically any
    dependency from shell but still doesn't work when running perl
    Makefile.PL && make - fails with same error.

    The saga ended when I installed latest Module::Install and
    Bundle::CPAN - now it works fine.

    Thank you Jonathan for pointing me to the right direction!

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedFeb 5, '07 at 9:22p
activeFeb 6, '07 at 7:21a
posts3
users2
websitecatalystframework.org
irc#catalyst

2 users in discussion

Svilen Ivanov: 2 posts Jonathan Rockway: 1 post

People

Translate

site design / logo © 2022 Grokbase