Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^8: Why is it in some other popular languages fewer steps and potential issues when installing libraries no testing needed and no compilation of C/C++ code done

by Anonymous Monk
on Apr 12, 2011 at 14:46 UTC ( [id://898950]=note: print w/replies, xml ) Need Help??


in reply to Re^7: Why is it in some other popular languages fewer steps and potential issues when installing libraries no testing needed and no compilation of C/C++ code done
in thread Why are other popular languages very different from Perl when installing libraries, e.g. no testing needed and no compilation of C/C++ code done

Maybe I'm a little slow on the uptake or something but I don't see how an interactive cpan client this solves the problem. I was saying that a good solution would be something that would work automatically -- that is, without human intervention -- to download and compile some specified list of modules and log all errors on a particular target system.

All you have to do is not run cpan/cpanp/cpanm in interactive mode :)

Now, specifically, how could I accomplish that?

You configure cpan/cpanp/cpanm to
run non-interactive
keep logs
install modules in a certain perfix
...
then you run it, something like this:
set PERL_MM_USE_DEFAULT=1 set PERL5_CPANPLUS_TEST_VERBOSE=1 set TEST_VERBOSE=1 set PERL5LIB=/home/user/stuff/lib/perl5 set PERL_MB_OPT=--install_base /home/user/stuff set PERL_MM_OPT=INSTALL_BASE=/home/user/stuff set PERL_CPANM_HOME=/home/user/stuff/.cpanm cpan-outdated -p | cpanm cat /home/user/stuff/.cpanm/build.log
  • Comment on Re^8: Why is it in some other popular languages fewer steps and potential issues when installing libraries no testing needed and no compilation of C/C++ code done
  • Download Code

Replies are listed 'Best First'.
Re^9: Why is it in some other popular languages fewer steps and potential issues when installing libraries no testing needed and no compilation of C/C++ code done
by InfiniteSilence (Curate) on Apr 12, 2011 at 16:30 UTC

    Crud! You know what I just realized...we can't really trust the tests that come from CPAN modules in all cases. Take the following example from GoogleProvisioningAPI:

    Google-ProvisioningAPI-0.11/t/Google-ProvisioningAPI.t # Before `make install' is performed this script should be runnable wi +th # `make test'. After `make install' it should work as `perl Google-Pro +visioningA PI.t' ######################### # change 'tests => 1' to 'tests => last_test_to_print'; use Test::More tests => 1; BEGIN { use_ok('Google::ProvisioningAPI') }; ######################### # Insert your test code below, the Test::More module is use()ed here s +o read # its man page ( perldoc Test::More ) for help writing this test scrip +t.

    That's it. Given such scant testing it is impossible to determine whether updates or changes to the module will break existing code.

    Celebrate Intellectual Diversity

      That's it. Given such scant testing it is impossible to determine whether updates or changes to the module will break existing code.

      Um, that is why your existing code should include tests :)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others musing on the Monastery: (1)
As of 2024-04-24 14:09 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found