Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
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.

Replies are listed 'Best First'.
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?
[1nickt]: choroba Understood. I'm wondering about the logic in a cpanfile. If the perl doesn't support threads, it's easy: require MCE. If the perl does support threads, as you say the user has a choice, so require both? Or, assume that irrespective of the choide
[1nickt]: ... choice, the threaded-perl user *probably* wants to use threads, therefore only require threads and leave MCE out, allowing the user to manually install if desired?
[choroba]: just require any of MCE and threads. Not sure if that's possible in the cpanfile, but should be possible early in the Makefile
[1nickt]: The app expects threads as default anyway, right?
[choroba]: that's true
[1nickt]: expects threads *to be* the default
[1nickt]: I think cpanfile can handle the logic. testing now.

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (14)
As of 2017-10-18 13:24 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My fridge is mostly full of:

















    Results (244 votes). Check out past polls.

    Notices?