Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

a nice perl package tool linux

by spx2 (Deacon)
on Jul 02, 2007 at 05:36 UTC ( [id://624380]=perlquestion: print w/replies, xml ) Need Help??

spx2 has asked for the wisdom of the Perl Monks concerning the following question:

is there any tool on linux similar to cpan that knows how to install packages with dependencies automatically ? like ppm is on windows i mean(maybe im not too knowledgeble of cpan's capabilities but i really would like a graphical package tool like ppm). there is this aptitude tool thing that could be used to install packages also for perl,i found about it 1 or 2 days ago..but uhm it doesnt have quite the latest versions, even more...allot of packages are not in aptitude. ok,if there is any tool like this please let me know,it would be pretty useful to me. thank you monks.

Replies are listed 'Best First'.
Re: a nice perl package tool linux
by shmem (Chancellor) on Jul 02, 2007 at 06:59 UTC
    You could just use cpan and set the configuration option prerequisites_policy to follow:
    qwurx [shmem] ~ > cpan cpan shell -- CPAN exploration and modules installation (v1.7602) ReadLine support enabled cpan> o conf prerequisites_policy follow

    Installing modules will then automatically install dependencies.

    * with a lot of handwaving *: Since you name aptitude, I assume you have a Debian based system. Try

    dh-make-perl --cpan module

    I don't know whether this is accurate still, or whether Ubuntu boxen have this - try it out.

    For RPM based systems, there is cpanflute to build packages from modules.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re: a nice perl package tool linux
by sago (Scribe) on Jul 02, 2007 at 08:03 UTC

    Installing the Modules

    -MCPAN -we 'shell'

    First, you'll need to configure the CPAN module. If you've never done this, it's really simple; just execute the above at your command line, and you're on your way. For our purposes, however, we need to make two small modifications to the standard procedure: when the script asks you for any extra arguments for Makefile.PL, you need to supply it with the following list (assuming that you chose '~/myperl' as your private lib directory):

    LIB=~/myperl/lib INSTALLSITEMAN1DIR=~/myperl/man/man1 INSTALLSITEMAN3DIR=~/myperl/man/man3

    You also need to make sure that the UNINST parameter is turned off; you can do this by setting 'UNINST=0' when that question comes up during the installation. (This is the default behavior unless you set it, but you might as well make sure.)

    If you had already configured the CPAN shell at some point in the past, you simply need to modify the configuration. Again, start the shell as above, and issue the following commands at the "cpan> " prompt:

    `` o conf makepl_arg "LIB=~/myperl/lib INSTALLSITEMAN1DIR=~/myperl/man/man1 INSTALLSITEMAN3DIR=~/myperl/man/man3" o conf make_install_arg UNINST=0 o conf commit ''

    and you're done. From this point forward, using the CPAN shell (or any of the other CPAN functions and methods) should work just like usual:

    # Invoke the shell
    perl -MCPAN -we shell

    # Install the Net::FTP module
    perl -MCPAN -we 'install "Net::FTP"'

    # Update all outdated modules on this system
    perl -MCPAN -we 'CPAN::Shell->install(CPAN::Shell->r)'
Re: a nice perl package tool linux
by jesuashok (Curate) on Jul 02, 2007 at 06:13 UTC

      Also called 'cpan' :)

      pc03:/W 503 $ cpan Terminal does not support AddHistory. cpan shell -- CPAN exploration and modules installation (v1.7601) ReadLine support available (try 'install Bundle::CPAN') cpan> help Display Information command argument description a,b,d,m WORD or /REGEXP/ about authors, bundles, distributions, mod +ules i WORD or /REGEXP/ about anything of above r NONE reinstall recommendations ls AUTHOR about files in the author's directory Download, Test, Make, Install... get download make make (implies get) test MODULES, make test (implies make) install DISTS, BUNDLES make install (implies test) clean make clean look open subshell in these dists' directories readme display these dists' README files Other h,? display this menu ! perl-code eval a perl comma +nd o conf [opt] set and query options q quit the cpan she +ll reload cpan load CPAN.pm again reload index load newer indice +s autobundle Snapshot force cmd unconditionally d +o cmd cpan>

      Enjoy, Have FUN! H.Merijn
Re: a nice perl package tool linux
by naikonta (Curate) on Jul 02, 2007 at 14:36 UTC
    If you're talking about CPAN packages, replies available so far are sufficient. If what you need is a graphical interface CPAN for linux, you may try the graphical tool that comes with CPANPLUS, as suggested by tweetiepooh. But, you may also want to read Is there a graphical CPAN installer?.

    Each (linux) distro has their own way on package management that resolves all dependencies, but they all, as you mention, are limited in the repository, and can't catch up to the latest release at CPAN. I do admit that having such tool would be very nice for those who need it. I haven't used CPANPLUS::Shell::Tk myself, I'm happy with cpan.


    Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

      Each (linux) distro has their own way on package management that resolves all dependencies, but they all, as you mention, are limited in the repository, and can't catch up to the latest release at CPAN. I do admit that having such tool would be very nice for those who need it. I haven't used CPANPLUS::Shell::Tk myself, I'm happy with cpan.

      In turn, I haven't used CPANPLUS which you mentioned yourself, but one distinguishing feature of it that I can remember of is the ability to create distro-specific packages on the fly, which would give one the best of both worlds: parallel distro and cpan package management! Support for some major distros is already there and for other ones it can be made available through suitable plugins: for some time I've been tempted to write code for mine (due to its simple nature it shouldn't be that difficult) but with some and occasionally several regrets on my own part from some time on I seem to have turned mostly in a Windows-kinda-guy, so if that is going to happen, it won't be anytime soon.

      Do i need to be in root to install thing with cpan?
        No, you don't have to, absolutely not :-)

        packet, have you read CPAN? Do you use perldoc? If man can't display modules documentation (for whatever reason), you can use perldoc instead. With it, you gain other benefits you won't get from man.

        $ perldoc CPAN $ perldoc CGI # this is cool $ perldoc -m CGI # only for Perl FAQs $ perldoc -q string # more on perldoc # perldoc perldoc

        Open source softwares? Share and enjoy. Make profit from them if you can. Yet, share and enjoy!

Re: a nice perl package tool linux
by tweetiepooh (Hermit) on Jul 02, 2007 at 13:42 UTC
    You could try CPANPLUS then add the Tk shell and use that instead of the normal character one. I've used it in the past but now just use the character shell.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://624380]
Approved by jesuashok
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2024-04-20 15:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found