Beefy Boxes and Bandwidth Generously Provided by pair Networks
We don't bite newbies here... much
 
PerlMonks  

Re: CPAN and readline on windows

by xdg (Monsignor)
on Mar 25, 2009 at 10:57 UTC ( #753091=note: print w/ replies, xml ) Need Help??


in reply to CPAN and readline on windows

Well, given that so much of CPAN.pm is still based on globals, you can do this:

perl -MCPAN -e "$CPAN::Suppress_readline=1; shell"

Eventually, that should probably get moved to (yet another) configuration option. Please consider opening up an RT ticket about it if there isn't one already so we have it on the list of things to do.

-xdg

Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.


Comment on Re: CPAN and readline on windows
Download Code
Re^2: CPAN and readline on windows
by BrowserUk (Pope) on Mar 25, 2009 at 16:55 UTC

    Yes. I've added:

    $Suppress_readline = 1;

    just after the use vars: where it is declared.

    The reason for asking if there was an official way of disabling it is because at the top of the shell() method, there is this line:

    $Suppress_readline = ! -t STDIN unless defined $Suppress_readline;

    which implies that $Suppress_readline could somehow be defined prior to the test on STDIN.

    I couldn't find the mechanism whereby that might occur--barring your way of setting it on the command line--, but had there been some existing mechanism (maybe an environment variable or similar), I would prefer that to modifying the script directly.


    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.
Re^2: CPAN and readline on windows
by BrowserUk (Pope) on Mar 25, 2009 at 18:05 UTC

        Okay, thanks.

        The reason I think that applying the disable in CPAN.BAT is good idea is that (I assume) people using *nix emulators (Cygwin Strawberry etc.) where they would need the ReadLine support, will probably not invoke cpan via a .BAT file?


        Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
        "Science is about questioning the status quo. Questioning authority".
        In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others taking refuge in the Monastery: (12)
As of 2014-07-25 16:33 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (174 votes), past polls