Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: force install from within a script?

by shmem (Chancellor)
on Aug 23, 2006 at 10:54 UTC ( [id://569050]=note: print w/replies, xml ) Need Help??


in reply to What's the connection between the CPAN programming methods to what happens in the CPAN shell?

Hmm. From the CPAN manpage:
The "force" command takes as a first argument the method to invoke (currently: "make", "test", or "install") and executes the command from scratch.
...
CPAN::Distribution::force($method,@args)
Forces CPAN to perform a task that normally would have failed. Force takes as arguments a method name to be called and any number of additional arguments that should be passed to the called method. The internals of the object get the needed changes so that CPAN.pm does not refuse to take the action.

So you probably have to say

force('install','SQL::Translator');

CPAN shell commands are method invocations, basically - shellish perl ;-)

--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}

Log In?
Username:
Password:

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

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

    No recent polls found