Re: [gtk-list] Gtk-Perl module building



Dermot Musgrove <dermot@glade.perl.connectfree.co.uk> writes:
> Hi,
> 
> This is a problem that Stas Bekman <sbekman@iname.com> has asked me about. 
> He is not on the gtk-list so I am reporting it for him.
> 
> He uses the CPAN shell to build and install modules but of course
> Gtk-Perl only builds the top level module by default. Is there a way to
> build the sub modules automatically? I don't know the CPAN shell but is
> it possible to build the sub modules using that?
> 

CPAN.pm¹ doesn't understand building Gtk-Perl's sub modules. The old
way to get it to work was to provide makepl args. This bit of code
used to work for making sure LWP and Gtk-Perl were both installed:

if (eval "require CPAN;") {
      use CPAN;
      for $mod (qw (Gtk LWP)){
        my $obj = CPAN::Shell->expand('Module',$mod);
        print "$obj\n";
        if ($mod =~ "Gtk") {
        # configure CPAN to use Gtk-Perl's makefile.pl args
          $foo = CPAN::Shell->o('conf', 'makepl_arg', '--with-gdkimlib --with-gnome --with-gtkxmhtml --with-gnome-panel');
        } else {
        # clear the makefile args
          $foo = CPAN::Shell->o('conf', 'makepl_arg', '');
        }
        $obj->install;
      }

It's pretty neat to offer to install necessary modules automagically,
saves the whack-a-mole you can end up playing with some perl programs'
module dependencies.

But I know of no way to tell the CPAN module to recurse through
Gtk-Perl's subdirectories doing the right thing.

BrYan

Footnotes: 
¹  CPAN shell is just a part of CPAN.pm. You can use it by doing:
perl -MCPAN -e shell



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]