Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

Re^3: 'rgb_palette' - Term::ANSIColor Helper -- rant about IO::Prompter

by Discipulus (Canon)
on Aug 18, 2022 at 08:59 UTC ( [id://11146216]=note: print w/replies, xml ) Need Help??


in reply to Re^2: 'rgb_palette' - Term::ANSIColor Helper
in thread 'rgb_palette' - Term::ANSIColor Helper

Hello kcott,

> I do like the feature-rich IO::Prompter module; the menus are perhaps my favourite bit.

well.. I dont know how to be kind about this, but I have a radical different opinion.

Given anyone is free to choose their tool I find very irritating to spot a nice perl module ( IO::Prompter ) with this statement in the docomentation:

Several features of this module are known to have problems under Windo +ws. If using that platform, you may have more success (and less distr +ess) by trying IO::Prompt::Tiny, IO::Prompt::Simple, or IO::Prompt::H +ooked first.

Well.. it is kind to inform me, but consider this situation:

Hey my friend! For sure I can lend you my wonderful supercar: it is very safe and fast but if you are not tall exactly 183 cm and 90 Kg the car probably will only go 40Km/h and the car can skid when cornering if your feet are not exactly 10 sized.

:( thanks, better I'll take the bus..

My busses are:

use Term::Readline; $ENV{PERL_RL} = "Perl"; my $term = Term::ReadLine->new('sweet_ol_bus'); $term->Attribs->{completion_function} = sub { my $txt = shift; return grep { /^$txt/i } sort keys %$my_list_of +_autocompletion; }; my $in; while ( defined ( $in = $term->readline( 'my_prompt>' ) ) ) { chomp ($in); ... }

More kind for IO::Prompter should be to have 00_OStest.t stating BAIL_OUT() if $^O eq "MSWin32" and instead I see all tests passing with only, ironically being an interactive module, t/styles.t ....................... skipped: Skipping interactive tests under Windows while all other interactive tests are ok:

All tests successful. Files=38, Tests=163, 53 wallclock secs ( 0.09 usr + 0.09 sys = 0.19 +CPU) Result: PASS

So please, consider it carefully before adopting a module if you plan to share your code widely. This is not criticism about you nor your code kcott, absolutely.

You will see me at the next Perl conference selling t-shirts with: Strawberry setups matter and Say NO to OSsism

</rant> :)

L*

There are no rules, there are no thumbs..
Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.

Replies are listed 'Best First'.
Re^4: 'rgb_palette' - Term::ANSIColor Helper -- rant about IO::Prompter
by hippo (Bishop) on Aug 18, 2022 at 10:33 UTC
    Hey my friend! For sure I can lend you my wonderful supercar: it is very safe and fast but if you are not tall exactly 183 cm and 90 Kg the car probably will only go 40Km/h and the car can skid when cornering if your feet are not exactly 10 sized.

    Top rant! However, one cannot choose one's height or shoe size whereas one can choose one's OS. If the analogy were that the supercar handles perfectly if you support Torino but corners poorly if you support Juventus then that's more like it. :-p


    🦛

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2024-04-19 12:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found