Codebase list libio-interactive-perl / f3b6b0c
New upstream version 1.023 gregor herrmann 3 years ago
7 changed file(s) with 69 addition(s) and 41 deletion(s). Raw diff Collapse all Expand all
00 Revision history for Perl module IO::Interactive
1
2 1.023 2021-02-03T22:37:57Z
3 * Explain why ARGV is a problem (Github #9)
4 * Freshen distro, remove Travis CI, add Github Actions
15
26 1.022 2016-09-04T05:31:39Z
37 * Stable release with some performance enhancements
5555 ^MYMETA\.
5656 #!end included /usr/local/perls/perl-5.20.0/lib/5.20.0/ExtUtils/MANIFEST.SKIP
5757
58 ^IO-
59 \.?appveyor.yml
60 \.releaserc
61 \.lwpcookies
62 \bMANIFEST\s\d
63 \bChanges\s\d
64 \.icloud$
65 \A\.github\b
5866
59 \.releaserc
60 ^IO-
61 \.travis\.yml
33 "Damian Conway <DCONWAY@cpan.org>"
44 ],
55 "dynamic_config" : 1,
6 "generated_by" : "ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.140640",
6 "generated_by" : "ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010",
77 "license" : [
8 "perl_5"
8 "artistic_2"
99 ],
1010 "meta-spec" : {
1111 "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec",
12 "version" : "2"
12 "version" : 2
1313 },
1414 "name" : "IO-Interactive",
1515 "no_index" : {
3535 },
3636 "test" : {
3737 "requires" : {
38 "Test::More" : "0.94"
38 "Test::More" : "1"
3939 }
4040 }
4141 },
5151 "web" : "https://github.com/briandfoy/io-interactive"
5252 }
5353 },
54 "version" : "1.022"
54 "version" : "1.023",
55 "x_serialization_backend" : "JSON::PP version 4.04"
5556 }
22 author:
33 - 'Damian Conway <DCONWAY@cpan.org>'
44 build_requires:
5 Test::More: '0.94'
5 Test::More: '1'
66 configure_requires:
77 ExtUtils::MakeMaker: '6.64'
88 File::Spec::Functions: '0'
99 dynamic_config: 1
10 generated_by: 'ExtUtils::MakeMaker version 7.04, CPAN::Meta::Converter version 2.140640'
11 license: perl
10 generated_by: 'ExtUtils::MakeMaker version 7.44, CPAN::Meta::Converter version 2.150010'
11 license: artistic_2
1212 meta-spec:
1313 url: http://module-build.sourceforge.net/META-spec-v1.4.html
1414 version: '1.4'
2323 bugtracker: https://github.com/briandfoy/io-interactive/issues
2424 homepage: https://github.com/briandfoy/io-interactive
2525 repository: https://github.com/briandfoy/io-interactive.git
26 version: '1.022'
26 version: '1.023'
27 x_serialization_backend: 'CPAN::Meta::YAML version 0.018'
4949 'AUTHOR' => 'Damian Conway <DCONWAY@cpan.org>',
5050 'VERSION_FROM' => $main_file,
5151 'ABSTRACT_FROM' => $main_file,
52 'LICENSE' => 'perl',
52 'LICENSE' => 'artistic_2',
5353
5454 'CONFIGURE_REQUIRES' => {
5555 'ExtUtils::MakeMaker' => '6.64',
6060 },
6161
6262 'TEST_REQUIRES' => {
63 'Test::More' => '0.94',
63 'Test::More' => '1',
6464 },
6565
6666 'PREREQ_PM' => {
11
22 =encoding utf8
33
4 =for HTML <a href="../../actions?query=workflow%3Amacos"><img src="../../workflows/macos/badge.svg"></a>
5
6 =for HTML <a href="../../actions?query=workflow%3Aubuntu"><img src="../../workflows/ubuntu/badge.svg"></a>
7
8 =for HTML <a href="../../actions?query=workflow%3Awindows"><img src="../../workflows/windows/badge.svg"></a>
9
10 =for HTML <a href='https://ci.appveyor.com/project/briandfoy/io-interactive'><img src='https://ci.appveyor.com/api/projects/status/nxocrwut3tcni3ei' /></a>
11
12 =for HTML <a href='https://coveralls.io/github/briandfoy/io-interactive?branch=master'><img src='https://coveralls.io/repos/github/briandfoy/io-interactive/badge.svg?branch=master' alt='Coverage Status' /></a>
13
14 =for HTML <a href="https://github.com/briandfoy/io-interactive/blob/master/LICENSE"><img src="https://img.shields.io/cpan/l/IO-Interactive.svg" /></a>
15
16 =for HTML <a href="https://metacpan.org/pod/IO::Interactive"><img src="https://img.shields.io/cpan/v/IO-Interactive.svg" /></A>
17
418 =head1 The IO::Interactive module
519
6 This is the I<README> for the L<IO::Interactive> Perl module. You're probably
20 This is the I<README> for the L<IO::Interactive> Perl module. You're probably
721 looking at this because you don't know where else to find what you're
8 looking for. Read this once and you might never have to read one again
22 looking for. Read this once and you might never have to read one again
923 for any Perl module.
1024
1125 =head2 Documentation
1226
13 To read about L<IO::Interactive>, look at the embedded documentation
14 in the module itself. Inside the distribution, you can format it
15 with L<perldoc|http://perldoc.perl.org/perldoc.html>:
27 To read about L<IO::Interactive>, look at the embedded documentation
28 in the module itself. Inside the distribution, you can format it
29 with L<perldoc|https://perldoc.perl.orgperldoc.html>:
1630
1731 % perldoc lib/IO/Interactive.pm
1832
2135
2236 % perldoc IO::Interactive
2337
24 You can read the documentation and inspect the meta data on one of the
25 CPAN web interfaces, such as L<CPAN Search|http://search.cpan.org/dist/IO-Interactive> or
26 L<MetaCPAN|http://www.metacpan.org/module/IO::Interactive>:
27
28 =over 4
29
30 =item * L<http://search.cpan.org/dist/IO-Interactive>
31
32 =item * L<http://www.metacpan.org/module/IO::Interactive>
33
34 =back
38 You can read the documentation and inspect the meta data at
39 L<MetaCPAN|https://metacpan.org/pod/IO::Interactive>.
3540
3641 The standard module documentation has example uses in the SYNOPSIS
3742 section, but you can also look in the I<examples/> directory (if it's
5863 % make test
5964 % make install
6065
61 You probably don't want to do that unless you're fiddling with the
66 You probably don't want to do that unless you're fiddling with the
6267 module and only want to run the tests without installing anything.
6368
6469 =head2 Source location
65
70
6671 The meta data, such as the source repository and bug tracker, is in
6772 I<Makefile.PL> or the I<META.*> files it creates. You can find that on
6873 those CPAN web interfaces, but you can also look at files directly in
7479
7580 =back
7681
77 If you find a problem, file a ticket in the L<issue
82 If you find a problem, file a ticket in the L<issue
7883 tracker|https://github.com/briandfoy/io-interactive/issues>:
7984
8085 =over 4
9398 L<Stackoverflow|http://www.stackoverflow.com>, both of which have many
9499 competent Perlers who can answer your question, almost in real time.
95100 They might not know the particulars of this module, but they can help
96 you diagnose your problem.
101 you diagnose your problem.
97102
98 You might like to read L<brian's Guide to Solving Any Perl
99 Problem|http://archive.oreilly.com/pub/a/perl/excerpts/9780596527242/brians-guide.html>.
103 You might like to read L<brian's Guide to Solving Any Perl
104 Problem|https://briandfoy.github.io/brians-guide-to-solving-any-perl-problem/>.
100105
101106 =head2 Copyright and License
102107
103108 You should have received a I<LICENSE> file, but the license is also noted
104109 in the module files. About the only thing you can't do is pretend that
105 you wrote code that you didn't.
110 you wrote code that you didn't.
106111
107112 =head2 Good luck!
108113
109 Enjoy,
114 Enjoy,
110115
111116 brian d foy, bdfoy@cpan.org
112117
0 use 5.008;
01 package IO::Interactive;
12
23 use strict;
34 use warnings;
45
5 $IO::Interactive::VERSION = '1.022';
6 $IO::Interactive::VERSION = '1.023';
67
78 sub is_interactive {
89 my ($out_handle) = (@_, select); # Default to default output handle
160161 =head1 DESCRIPTION
161162
162163 This module provides three utility subroutines that make it easier to
163 develop interactive applications...
164 develop interactive applications.
165
166 The C<ARGV> filehandle, the one that C<< <> >> or an empty
167 C<readline()> uses, has various magic associated with it. It's not
168 actually opened until you try to read from it. Checking C<-t ARGV>
169 before you've tried to read from it might give you the wrong answer.
170 Not only that, you might not read from C<ARGV>. If the value in
171 C<@ARGV> is the magic filename C<-> (a convention to mean the standard
172 filehandle for input or output), C<ARGV> might actually be C<STDIN>.
173 You don't want to think about all of this. This module is discussed in
174 I<Perl Best Practices> on page 218. Also see the C<ARGV> entry in
175 L<perlvar> and the C<readline> entry in L<perlfunc>.
164176
165177 =over
166178
263275
264276 =head1 LICENCE AND COPYRIGHT
265277
266 Copyright (c) 2005, Damian Conway C<< <DCONWAY@cpan.org> >>. All rights reserved.
278 Copyright © 2005-2021, Damian Conway C<< <DCONWAY@cpan.org> >>. All rights reserved.
267279
268280 This module is free software; you can redistribute it and/or
269281 modify it under the same terms as Perl itself.