Bug 459098

Summary: force install module does not work from command line
Product: Red Hat Enterprise Linux 5 Reporter: Petr Šplíchal <psplicha>
Component: perlAssignee: perl-maint-list
Status: CLOSED NOTABUG QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 5.2CC: ohudlick, ppisar, rvokal
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2010-11-30 08:59:59 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Petr Šplíchal 2008-08-14 13:46:59 UTC
Description of problem:

When reinstalling a perl module from CPAN using command line the force option does not have the expected effect.

Version-Release number of selected component (if applicable):
perl-5.8.8-14.el5

How reproducible:
Always

Steps to Reproduce:
1. perl -MCPAN -e 'force install "Scalar::Util"'
2. perl -MCPAN -e 'force install "Scalar::Util"'
  
Actual results:
Scalar::Util is up to date.

Expected results:
Scalar::Util is forced to be reinstalled despite being up to date.

Additional info:
The interactive way of force installing works fine:

perl -MCPAN -e shell
cpan> force install "Scalar::Util"

Comment 2 RHEL Program Management 2010-08-09 19:29:56 UTC
This request was evaluated by Red Hat Product Management for
inclusion in the current release of Red Hat Enterprise Linux.
Because the affected component is not scheduled to be updated in the
current release, Red Hat is unfortunately unable to address this
request at this time. Red Hat invites you to ask your support
representative to propose this request, if appropriate and relevant,
in the next release of Red Hat Enterprise Linux.

Comment 3 Marcela Mašláňová 2010-10-06 14:37:16 UTC
At least with CPAN v1.9402 it does work. In RHEL-5 we have v1.7602 which doesn't force install from shell, but force does work from cpan prompt.

Comment 4 Petr Pisar 2010-11-29 15:48:20 UTC
I can reproduce it with CPAN 1.9402 from RHEL-6 (latest upstream version), so I conclude it's not yet fixed in upstream.

Comment 5 Petr Pisar 2010-11-30 08:59:59 UTC
As pointed in upstream tracker:

> > # perl -MCPAN -e 'force install "Scalar::Util"'
>
> What you write here is
>   force(install('Scalar::Util'))
>
> What you want is
>   force("install", "Scalar::Util")

And that really works.

The `force' function takes list of arguments no a scalar. Please use correct syntax:

$ perl -MCPAN -e 'force("install", "Scalar::Util")'