IO-Interactive-1.027/0000755000076500000240000000000015000150472013255 5ustar brianstaffIO-Interactive-1.027/LICENSE0000644000076500000240000002173615000150471014272 0ustar brianstaffThe IO::Interactive module is licensed under the same terms as perl itself, under the Artistic License 2.0. Artistic License 2.0 Copyright (c) 2000-2006, The Perl Foundation. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble ******** This license establishes the terms under which a given free software Package may be copied, modified, distributed, and/or redistributed. The intent is that the Copyright Holder maintains some artistic control over the development of that Package while still keeping the Package available as open source and free software. You are always permitted to make arrangements wholly outside of this license directly with the Copyright Holder of a given Package. If the terms of this license do not permit the full use that you propose to make of the Package, you should contact the Copyright Holder and seek a different licensing arrangement. Definitions *********** "Copyright Holder" means the individual(s) or organization(s) named in the copyright notice for the entire Package. "Contributor" means any party that has contributed code or other material to the Package, in accordance with the Copyright Holder's procedures. "You" and "your" means any person who would like to copy, distribute, or modify the Package. "Package" means the collection of files distributed by the Copyright Holder, and derivatives of that collection and/or of those files. A given Package may consist of either the Standard Version, or a Modified Version. "Distribute" means providing a copy of the Package or making it accessible to anyone else, or in the case of a company or organization, to others outside of your company or organization. "Distributor Fee" means any fee that you charge for Distributing this Package or providing support for this Package to another party. It does not mean licensing fees. "Standard Version" refers to the Package if it has not been modified, or has been modified only in ways explicitly requested by the Copyright Holder. "Modified Version" means the Package, if it has been changed, and such changes were not explicitly requested by the Copyright Holder. "Original License" means this Artistic License as Distributed with the Standard Version of the Package, in its current version or as it may be modified by The Perl Foundation in the future. "Source" form means the source code, documentation source, and configuration files for the Package. "Compiled" form means the compiled bytecode, object code, binary, or any other form resulting from mechanical transformation or translation of the Source form. Permission for Use and Modification Without Distribution ******************************************************** (1) You are permitted to use the Standard Version and create and use Modified Versions for any purpose without restriction, provided that you do not Distribute the Modified Version. Permissions for Redistribution of the Standard Version ****************************************************** (2) You may Distribute verbatim copies of the Source form of the Standard Version of this Package in any medium without restriction, either gratis or for a Distributor Fee, provided that you duplicate all of the original copyright notices and associated disclaimers. At your discretion, such verbatim copies may or may not include a Compiled form of the Package. (3) You may apply any bug fixes, portability changes, and other modifications made available from the Copyright Holder. The resulting Package will still be considered the Standard Version, and as such will be subject to the Original License. Distribution of Modified Versions of the Package as Source ********************************************************** (4) You may Distribute your Modified Version as Source (either gratis or for a Distributor Fee, and with or without a Compiled form of the Modified Version) provided that you clearly document how it differs from the Standard Version, including, but not limited to, documenting any non-standard features, executables, or modules, and provided that you do at least ONE of the following: (a) make the Modified Version available to the Copyright Holder of the Standard Version, under the Original License, so that the Copyright Holder may include your modifications in the Standard Version. (b) ensure that installation of your Modified Version does not prevent the user installing or running the Standard Version. In addition, the Modified Version must bear a name that is different from the name of the Standard Version. (c) allow anyone who receives a copy of the Modified Version to make the Source form of the Modified Version available to others under (i) the Original License or (ii) a license that permits the licensee to freely copy, modify and redistribute the Modified Version using the same licensing terms that apply to the copy that the licensee received, and requires that the Source form of the Modified Version, and of any works derived from it, be made freely available in that license fees are prohibited but Distributor Fees are allowed. Distribution of Compiled Forms of the Standard Version or Modified ****************************************************************** Versions without the Source *************************** (5) You may Distribute Compiled forms of the Standard Version without the Source, provided that you include complete instructions on how to get the Source of the Standard Version. Such instructions must be valid at the time of your distribution. If these instructions, at any time while you are carrying out such distribution, become invalid, you must provide new instructions on demand or cease further distribution. If you provide valid instructions or cease distribution within thirty days after you become aware that the instructions are invalid, then you do not forfeit any of your rights under this license. (6) You may Distribute a Modified Version in Compiled form without the Source, provided that you comply with Section 4 with respect to the Source of the Modified Version. Aggregating or Linking the Package ********************************** (7) You may aggregate the Package (either the Standard Version or Modified Version) with other packages and Distribute the resulting aggregation provided that you do not charge a licensing fee for the Package. Distributor Fees are permitted, and licensing fees for other components in the aggregation are permitted. The terms of this license apply to the use and Distribution of the Standard or Modified Versions as included in the aggregation. (8) You are permitted to link Modified and Standard Versions with other works, to embed the Package in a larger work of your own, or to build stand-alone binary or bytecode versions of applications that include the Package, and Distribute the result without restriction, provided the result does not expose a direct interface to the Package. Items That are Not Considered Part of a Modified Version ******************************************************** (9) Works (including, but not limited to, modules and scripts) that merely extend or make use of the Package, do not, by themselves, cause the Package to be a Modified Version. In addition, such works are not considered parts of the Package itself, and are not subject to the terms of this license. General Provisions ****************** (10) Any use, modification, and distribution of the Standard or Modified Versions is governed by this Artistic License. By using, modifying or distributing the Package, you accept this license. Do not use, modify, or distribute the Package, if you do not accept this license. (11) If your Modified Version has been derived from a Modified Version made by someone other than you, you are nevertheless required to ensure that your Modified Version complies with the requirements of this license. (12) This license does not grant you the right to use any trademark, service mark, tradename, or logo of the Copyright Holder. (13) This license includes the non-exclusive, worldwide, free-of-charge patent license to make, have made, use, offer to sell, sell, import and otherwise transfer the Package with respect to any patent claims licensable by the Copyright Holder that are necessarily infringed by the Package. If you institute patent litigation (including a cross-claim or counterclaim) against any party alleging that the Package constitutes direct or contributory patent infringement, then this Artistic License to you shall terminate on the date that such litigation is filed. (14) Disclaimer of Warranty: THE PACKAGE IS PROVIDED BY THE COPYRIGHT HOLDER AND CONTRIBUTORS "AS IS' AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES. THE IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT ARE DISCLAIMED TO THE EXTENT PERMITTED BY YOUR LOCAL LAW. UNLESS REQUIRED BY LAW, NO COPYRIGHT HOLDER OR CONTRIBUTOR WILL BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING IN ANY WAY OUT OF THE USE OF THE PACKAGE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. IO-Interactive-1.027/Changes0000644000076500000240000000421215000150471014546 0ustar brianstaffRevision history for Perl module IO::Interactive 1.027 2025-04-17T10:00:24Z * require a newer version.pm for v5.10.1 tests 1.026 2025-01-26T21:58:11Z * refresh distro and move to BRIANDFOY 1.025 2023-07-05T15:01:36Z * Remove unnecessary -T from pod tests now that v5.38 allows you to compile a perl without taint support. Those perls will refuse to run the programs using -T. 1.023 2021-02-03T22:37:57Z * Explain why ARGV is a problem (Github #9) * Freshen distro, remove Travis CI, add Github Actions 1.022 2016-09-04T05:31:39Z * Stable release with some performance enhancements 1.021_02 - 2016-08-30T08:09:35Z * Lazy load Carp (Todd Rinaldo) 1.021 = 2016-01-27T20:29:17Z * Freshen the distro a bit * Somehow CPAN still has 0.0.6, so no one has David Muey's enhancements 1.01 - 2011-11-18 * Decrease memory use a bit ***: 1. lazy load Carp.pm only if we're about to croak() 2. Remove use of version.pm since a decimal will do (made it 1.01 per discussion) - moots rt 50120 3. Remove the need for Scalar::Util === Baseline RSS 1204, Orig RSS 2464 (+1260), New RSS 2244 (+1040) Technically -220 not a *huge* gain, but the ::Tiny version I'd worked up before this patch had an RSS of 1332 (+128). I need to look into that and see if anything else could be done here. 0.0.6 - 2009-01-14 0.0.5 - 2009-01-14 * Happy 2009! There aren't any code changes, but I needed to make the version in the Pod match the code version. 0.0.4 - 2008-08-31 * Fixes include: * #24823: is_interactive() and command line arguments * #38660: "null" filehandle is a memory leak * #20689: IO::Interactive leaks temp files 0.03_01 - 2008-08-24 * Cleaning up old tickets: * #20689 Now that we don't use a scalar filehandle, no extra temp files under 5.6.2 * #24823 Applied Schwern's patch to ignore command line arguments * #38660 Fix memory link (same fix for #20689), not printing to a scalar * Maintainer is now brian d foy 0.0.3 - 2006-02-17 * Fixed is_interactive to default to currently selected filehandle, rather than to *STDOUT. 0.0.2 - 2005-05-22 * added dependency on version.pm 0.0.1 - 2005-03-17 * Initial release. IO-Interactive-1.027/MANIFEST0000644000076500000240000000067015000150472014411 0ustar brianstaffChanges examples/interactive.pl examples/memory_test.pl INSTALL.SKIP lib/IO/Interactive.pm LICENSE Makefile.PL MANIFEST This list of files MANIFEST.SKIP README.pod SECURITY.md t/00.load.t t/busy.t t/interactive.t t/is_interactive.t t/pod-coverage.t t/pod.t xt/changes.t META.yml Module YAML meta-data (added by MakeMaker) META.json Module JSON meta-data (added by MakeMaker) IO-Interactive-1.027/t/0000755000076500000240000000000015000150472013520 5ustar brianstaffIO-Interactive-1.027/t/pod.t0000644000076500000240000000021115000150471014460 0ustar brianstaff#!perl use Test::More; eval "use Test::Pod 1.14"; plan skip_all => "Test::Pod 1.14 required for testing POD" if $@; all_pod_files_ok(); IO-Interactive-1.027/t/interactive.t0000644000076500000240000000046615000150471016227 0ustar brianstaffuse IO::Interactive qw( interactive ); print "1..2\n"; if (-t *STDIN && -t *STDOUT ) { print {interactive} "ok 1\n"; print {interactive(*STDOUT)} "ok 2\n"; } else { print {interactive} "not "; print "ok 1\n"; print {interactive(*STDOUT)} "not "; print "ok 2\n"; } IO-Interactive-1.027/t/pod-coverage.t0000644000076500000240000000025115000150471016255 0ustar brianstaff#!perl use Test::More; eval "use Test::Pod::Coverage 1.04"; plan skip_all => "Test::Pod::Coverage 1.04 required for testing POD coverage" if $@; all_pod_coverage_ok(); IO-Interactive-1.027/t/busy.t0000644000076500000240000000024115000150471014663 0ustar brianstaffuse IO::Interactive qw( busy ); print "1..2\n"; *ARGV = *DATA; my $fh = busy { print "ok 1\n"; sleep 3; }; print <$fh>; print ; __DATA__ ok 2 IO-Interactive-1.027/t/00.load.t0000644000076500000240000000020115000150471015032 0ustar brianstaffuse Test::More tests => 1; BEGIN { use_ok( 'IO::Interactive' ); } diag( "Testing IO::Interactive $IO::Interactive::VERSION" ); IO-Interactive-1.027/t/is_interactive.t0000644000076500000240000000156315000150471016721 0ustar brianstaff#!/usr/bin/perl -w use Test::More 'no_plan'; use IO::Interactive qw( is_interactive ); # Tests which depend on not being connected to a terminal SKIP: { skip "connected to a terminal", 2 if -t *STDIN && -t *STDOUT; ok !is_interactive(); ok !is_interactive(*STDOUT); } # Tests which depend on being connected to a terminal. SKIP: { skip "not connected to a terminal", 7 unless -t *STDIN && -t *STDOUT; ok is_interactive(); ok is_interactive(*STDOUT); { ok open my $manifest_fh, '<', "MANIFEST"; # any ol file will do. ok !is_interactive($manifest_fh); my $old_fh = select $manifest_fh; ok !is_interactive(), 'defaults to selected filehandle'; select $old_fh; } { local @ARGV = qw(-); ok is_interactive(); @ARGV = (1,2,3); ok is_interactive(); } } IO-Interactive-1.027/xt/0000755000076500000240000000000015000150472013710 5ustar brianstaffIO-Interactive-1.027/xt/changes.t0000644000076500000240000000020315000150471015477 0ustar brianstaffuse Test::More; eval 'use Test::CPAN::Changes'; plan skip_all => 'Test::CPAN::Changes required for this test' if $@; changes_ok(); IO-Interactive-1.027/README.pod0000644000076500000240000001141215000150471014714 0ustar brianstaff=pod =encoding utf8 =for HTML =for HTML =for HTML =for HTML =for HTML Coverage Status =for HTML =for HTML =head1 The IO::Interactive module This is the I for the L Perl module. You're probably looking at this because you don't know where else to find what you're looking for. Read this once and you might never have to read one again for any Perl module. =head2 Documentation To read about L, look at the embedded documentation in the module itself. Inside the distribution, you can format it with L: % perldoc lib/IO/Interactive.pm If you have already installed the module, you can specify the module name instead of the file location: % perldoc IO::Interactive You can read the documentation and inspect the meta data at L. The standard module documentation has example uses in the SYNOPSIS section, but you can also look in the I directory (if it's there), or look at the test files in I. =head2 Installation You can install this module with a CPAN client, which will resolve and install the dependencies: % cpan IO::Interactive % cpanm IO::Interactive You can also install directly from the distribution directory, which will also install the dependencies: % cpan . % cpanm . You could install just this module manually: % perl Makefile.PL % make % make test % make install You probably don't want to do that unless you're fiddling with the module and only want to run the tests without installing anything. =head2 Source location The meta data, such as the source repository and bug tracker, is in I or the I files it creates. You can find that on those CPAN web interfaces, but you can also look at files directly in the source repository: L If you find a problem, file a ticket in the L. There are also backup repositories hosted on other services. These reflect the state of the main repo and exist only for redundancy: =over 4 =item * L =item * L =item * L =back =head2 GitHub Attestations This distribution now uses L, which allow you to verify that the archive file you have was made from the official repo. You need a GitHub account and the L. # download the distro file from GitHub, MetaCPAN, or a CPAN mirror $ gh auth login ...follow instructions... $ gh attestation verify IO-Interactive-1.23.tar.gz --owner briandfoy =head2 Getting help Although I'm happy to hear from module users in private email, that's the best way for me to forget to do something. Besides the issue trackers, you can find help at L or L, both of which have many competent Perlers who can answer your question, almost in real time. They might not know the particulars of this module, but they can help you diagnose your problem. You might like to read L. =head2 Copyright and License You should have received a I file, but the license is also noted in the module files. About the only thing you can't do is pretend that you wrote code that you didn't. =head2 Good luck! Enjoy, brian d foy, briandfoy@pobox.com =cut IO-Interactive-1.027/MANIFEST.SKIP0000644000076500000240000000211315000150471015147 0ustar brianstaff#!start included /usr/local/perls/perl-5.20.0/lib/5.20.0/ExtUtils/MANIFEST.SKIP # Avoid version control files. \bRCS\b \bCVS\b \bSCCS\b ,v$ \B\.svn\b \B\.git\b \B\.gitignore\b \b_darcs\b \B\.cvsignore$ # Avoid VMS specific MakeMaker generated files \bDescrip.MMS$ \bDESCRIP.MMS$ \bdescrip.mms$ # Avoid Makemaker generated and utility files. \bMANIFEST\.bak \bMakefile$ \bblib/ \bMakeMaker-\d \bpm_to_blib\.ts$ \bpm_to_blib$ \bblibdirs\.ts$ # 6.18 through 6.25 generated this # Avoid Module::Build generated and utility files. \bBuild$ \b_build/ \bBuild.bat$ \bBuild.COM$ \bBUILD.COM$ \bbuild.com$ # Avoid temp and backup files. ~$ \.old$ \#$ \b\.# \.bak$ \.tmp$ \.# \.rej$ # Avoid OS-specific files/dirs # Mac OSX metadata \B\.DS_Store # Mac OSX SMB mount metadata files \B\._ # Avoid Devel::Cover and Devel::CoverX::Covered files. \bcover_db\b \bcovered\b # Avoid MYMETA files ^MYMETA\. #!end included /usr/local/perls/perl-5.20.0/lib/5.20.0/ExtUtils/MANIFEST.SKIP ^IO- \.?appveyor.yml \.releaserc \.lwpcookies \bMANIFEST\s\d \bChanges\s\d \.icloud$ \A\.github\b \.gitattributes\b IO-Interactive-1.027/examples/0000755000076500000240000000000015000150472015073 5ustar brianstaffIO-Interactive-1.027/examples/interactive.pl0000644000076500000240000000023615000150471017745 0ustar brianstaff#!/usr/bin/perl -w use IO::Interactive qw(is_interactive); if( is_interactive() ) { print "interactive\n\n"; } else { print "NOT interactive\n\n"; }IO-Interactive-1.027/examples/memory_test.pl0000644000076500000240000000025215000150471017775 0ustar brianstaff#!/usr/bin/perl use IO::Interactive; print "Testing memory consumption as process $$\n"; $SIG{INT} = sub { exit }; while( 1 ) { print { interactive } 'a' x 4096; }IO-Interactive-1.027/META.yml0000664000076500000240000000143315000150472014531 0ustar brianstaff--- abstract: 'Utilities for interactive I/O' author: - 'Damian Conway ' build_requires: Test::More: '1' version: '0.86' configure_requires: ExtUtils::MakeMaker: '6.64' File::Spec::Functions: '0' dynamic_config: 1 generated_by: 'ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010' license: artistic_2 meta-spec: url: http://module-build.sourceforge.net/META-spec-v1.4.html version: '1.4' name: IO-Interactive no_index: directory: - t - inc requires: perl: '5.008' resources: bugtracker: https://github.com/briandfoy/io-interactive/issues homepage: https://github.com/briandfoy/io-interactive repository: https://github.com/briandfoy/io-interactive version: '1.027' x_serialization_backend: 'CPAN::Meta::YAML version 0.018' IO-Interactive-1.027/lib/0000755000076500000240000000000015000150472014023 5ustar brianstaffIO-Interactive-1.027/lib/IO/0000755000076500000240000000000015000150472014332 5ustar brianstaffIO-Interactive-1.027/lib/IO/Interactive.pm0000644000076500000240000002115315000150471017146 0ustar brianstaffuse 5.008; package IO::Interactive; use strict; use warnings; $IO::Interactive::VERSION = '1.027'; sub is_interactive { my ($out_handle) = (@_, select); # Default to default output handle # Not interactive if output is not to terminal... return 0 if not -t $out_handle; # If *ARGV is opened, we're interactive if... if ( tied(*ARGV) or defined(fileno(ARGV)) ) { # this is what 'Scalar::Util::openhandle *ARGV' boils down to # ...it's currently opened to the magic '-' file return -t *STDIN if defined $ARGV && $ARGV eq '-'; # ...it's at end-of-file and the next file is the magic '-' file return @ARGV>0 && $ARGV[0] eq '-' && -t *STDIN if eof *ARGV; # ...it's directly attached to the terminal return -t *ARGV; } # If *ARGV isn't opened, it will be interactive if *STDIN is attached # to a terminal. else { return -t *STDIN; } } local (*DEV_NULL, *DEV_NULL2); my $dev_null; BEGIN { pipe *DEV_NULL, *DEV_NULL2 or die "Internal error: can't create null filehandle"; $dev_null = \*DEV_NULL; } sub interactive { my ($out_handle) = (@_, \*STDOUT); # Default to STDOUT return &is_interactive ? $out_handle : $dev_null; } sub _input_pending_on { my ($fh) = @_; my $read_bits = ""; my $bit = fileno($fh); return if $bit < 0; vec($read_bits, fileno($fh), 1) = 1; select $read_bits, undef, undef, 0.1; return $read_bits; } sub busy (&) { my ($block_ref) = @_; # Non-interactive busy-ness is easy...just do it if (!is_interactive()) { $block_ref->(); open my $fh, '<', \ ""; return $fh; } # Otherwise fork off an interceptor process... my ($read, $write); pipe $read, $write; my $child = fork; # Within that interceptor process... if (!$child) { # Prepare to send back any intercepted input... use IO::Handle; close $read; $write->autoflush(1); # Intercept that input... while (1) { if (_input_pending_on(\*ARGV)) { # Read it... my $res = ; # Send it back to the parent... print {$write} $res; # Admonish them for not waiting... print {*STDERR} "That input was ignored. ", "Please don't press any keys yet.\n"; } } exit; } # Meanwhile, back in the parent... close $write; # Temporarily close the input... local *ARGV; open *ARGV, '<', \ ""; # Do the job... $block_ref->(); # Take down the interceptor... kill 9, $child; wait; # Return whatever the interceptor caught... return $read; } sub import { my ($package) = shift; my $caller = caller; # Export each sub if it's requested... for my $request ( @_ ) { no strict 'refs'; my $impl = *{$package.'::'.$request}{CODE}; if(!$impl || $request =~ m/\A _/xms) { require Carp; Carp::croak("Unknown subroutine ($request()) requested"); } *{$caller.'::'.$request} = $impl; } } 1; # Magic true value required at end of module __END__ =encoding utf8 =head1 NAME IO::Interactive - Utilities for interactive I/O =head1 VERSION This document describes IO::Interactive version 1.02 =head1 SYNOPSIS use IO::Interactive qw(is_interactive interactive busy); if ( is_interactive() ) { print "Running interactively\n"; } # or... print {interactive} "Running interactively\n"; $fh = busy { do_noninteractive_stuff(); } =head1 DESCRIPTION This module provides three utility subroutines that make it easier to develop interactive applications. The C filehandle, the one that C<< <> >> or an empty C uses, has various magic associated with it. It's not actually opened until you try to read from it. Checking C<-t ARGV> before you've tried to read from it might give you the wrong answer. Not only that, you might not read from C. If the value in C<@ARGV> is the magic filename C<-> (a convention to mean the standard filehandle for input or output), C might actually be C. You don't want to think about all of this. This module is discussed in I on page 218. Also see the C entry in L and the C entry in L. =over =item C This subroutine returns true if C<*ARGV> and the currently selected filehandle (usually C<*STDOUT>) are connected to the terminal. The test is considerably more sophisticated than: -t *ARGV && -t *STDOUT as it takes into account the magic behaviour of C<*ARGV>. You can also pass C a writable filehandle, in which case it requires that filehandle be connected to a terminal (instead of the currently selected). The usual suspect here is C<*STDERR>: if ( is_interactive(*STDERR) ) { carp $warning; } Note that C may return true in a Windows Scheduled Task. See Github #6 (https://github.com/briandfoy/io-interactive/issues/6). =item C This subroutine returns C<*STDOUT> if C is true. If C is false, C returns a filehandle that does not print. This makes it easy to create applications that print out only when the application is interactive: print {interactive} "Please enter a value: "; my $value = <>; You can also pass C a writable filehandle, in which case it writes to that filehandle if it is connected to a terminal (instead of writing to C<*STDOUT>). Once again, the usual suspect is C<*STDERR>: print {interactive(*STDERR)} $warning; =item C This subroutine takes a block as its single argument and executes that block. Whilst the block is executed, C<*ARGV> is temporarily replaced by a closed filehandle. That is, no input from C<*ARGV> is possible in a C block. Furthermore, any attempts to send input into the C block through C<*ARGV> is intercepted and a warning message is printed to C<*STDERR>. The C call returns a filehandle that contains the intercepted input. A C block is therefore useful to prevent attempts at input when the program is busy at some non-interactive task. =back =head1 DIAGNOSTICS =over =item Unknown subroutine (%s) requested This module only exports the three subroutines described above. You asked for something else. Maybe you misspelled the subroutine you wanted. =back =head1 CONFIGURATION AND ENVIRONMENT IO::Interactive requires no configuration files or environment variables. =head1 DEPENDENCIES This module requires the C subroutine from the Scalar::Util module. =head1 INCOMPATIBILITIES None reported. =head1 BUGS AND LIMITATIONS No bugs have been reported. Please report any bugs or feature requests to Github L. =head1 SOURCE AVAILABILITY This code is in GitHub: https://github.com/briandfoy/io-interactive =head1 AUTHOR Damian Conway C<< >> Currently maintained by brian d foy C<< >>. 1.01 patch DMUEY C<< dmuey@cpan.org >> =head1 LICENCE AND COPYRIGHT Copyright © 2005-2021, Damian Conway C<< >>. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 DISCLAIMER OF WARRANTY BECAUSE THIS SOFTWARE IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE SOFTWARE, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE SOFTWARE "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE SOFTWARE IS WITH YOU. SHOULD THE SOFTWARE PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR, OR CORRECTION. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE SOFTWARE AS PERMITTED BY THE ABOVE LICENCE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE SOFTWARE (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE SOFTWARE TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. =cut IO-Interactive-1.027/Makefile.PL0000644000076500000240000000520615000150471015231 0ustar brianstaffpackage IO::Interactive; use strict; use warnings; =encoding utf8 =head1 The build file for IO::Interactive This build file is a modulino; it works as both a build script and a module. To build the distribution, run this file normally: % perl Makefile.PL But, it's more interesting than that. You can load it with C and call C to get the data structure it passes to C: my $package = require '/path/to/Makefile.PL'; my $arguments = $package->arguments; Note that C-ing a file makes an entry in C<%INC> for exactly that name. If you try to C another file with the same name, even from a different path, C thinks it has already loaded the file. As such, I recommend you always require the full path to the file. The return value of the C is a package name (in this case, the name of the main module. Use that to call the C method. Even if this distribution needs a higher version of Perl, this bit only needs v5.8. You can play with the data structure with a primitive Perl. =cut use File::Spec::Functions qw(catfile); my $module = __PACKAGE__; ( my $dist = $module ) =~ s/::/-/g; my $github = 'https://github.com/briandfoy/io-interactive'; my $main_file = catfile( 'lib', split /::/, "$module.pm" ); my %WriteMakefile = ( 'MIN_PERL_VERSION' => '5.008', 'NAME' => $module, 'AUTHOR' => 'Damian Conway ', 'VERSION_FROM' => $main_file, 'ABSTRACT_FROM' => $main_file, 'LICENSE' => 'artistic_2', 'CONFIGURE_REQUIRES' => { 'ExtUtils::MakeMaker' => '6.64', 'File::Spec::Functions' => '0', }, 'BUILD_REQUIRES' => { }, 'TEST_REQUIRES' => { 'Test::More' => '1', 'version' => '0.86', }, 'PREREQ_PM' => { }, 'META_MERGE' => { 'meta-spec' => { version => 2 }, resources => { repository => { type => 'git', url => $github, web => $github, }, bugtracker => { web => "$github/issues", }, homepage => $github, }, }, clean => { FILES => "$dist-*" }, ); sub arguments { \%WriteMakefile } do_it() unless caller; sub do_it { require File::Spec; my $MM ='ExtUtils::MakeMaker'; my $MM_version = eval{ "$MM " . $WriteMakefile{'CONFIGURE_REQUIRES'}{'ExtUtils::MakeMaker'} } || "$MM 6.64"; eval "use $MM_version; 1" or die "Could not load $MM_version: $@"; eval "use Test::Manifest 1.21" if -e catfile( qw(t test_manifest) ); my $arguments = arguments(); my $minimum_perl = $arguments->{MIN_PERL_VERSION} || '5.008'; eval "require $minimum_perl;" or die $@; WriteMakefile( %$arguments ); } no warnings; __PACKAGE__; IO-Interactive-1.027/INSTALL.SKIP0000644000076500000240000000015615000150471015054 0ustar brianstaffREADME\.pod README.* # things that might be in local directories after fooling # around with them \.DS_Store IO-Interactive-1.027/SECURITY.md0000644000076500000240000000231015000150471015041 0ustar brianstaff# Security Policy for IO::Interactive ## Reporting security issues **Do not report security problems on public forums or in repository issues.** Privately report vulnerabilities to the maintainers listed at the end of this document. Include as many details as possible to reproduce the issue, including code samples or test cases. Check that your report does not expose any of your sensitive data, such as passwords, tokens, or other secrets. You do not need to have a solution or fix. Depending on the issue, CPANSec may be notified. Depending on the issue, CPANSec may be notified. You can also privately report issues to the CPAN Security Group (CPANSec) . This is especially important if you think a vulnerability is being actively exploited. CPANSec may report the issue to the relevant authorities. See [Report a Security Issue](https://security.metacpan.org/docs/report.html). ## Response to reports The maintainers aim to respond to all reports within one day, but this may be affected by life and other things that happen to people who maintain open source code. A new release will be provided as soon as possible. ## Maintainers * brian d foy, IO-Interactive-1.027/META.json0000664000076500000240000000263015000150472014701 0ustar brianstaff{ "abstract" : "Utilities for interactive I/O", "author" : [ "Damian Conway " ], "dynamic_config" : 1, "generated_by" : "ExtUtils::MakeMaker version 7.70, CPAN::Meta::Converter version 2.150010", "license" : [ "artistic_2" ], "meta-spec" : { "url" : "http://search.cpan.org/perldoc?CPAN::Meta::Spec", "version" : 2 }, "name" : "IO-Interactive", "no_index" : { "directory" : [ "t", "inc" ] }, "prereqs" : { "build" : { "requires" : {} }, "configure" : { "requires" : { "ExtUtils::MakeMaker" : "6.64", "File::Spec::Functions" : "0" } }, "runtime" : { "requires" : { "perl" : "5.008" } }, "test" : { "requires" : { "Test::More" : "1", "version" : "0.86" } } }, "release_status" : "stable", "resources" : { "bugtracker" : { "web" : "https://github.com/briandfoy/io-interactive/issues" }, "homepage" : "https://github.com/briandfoy/io-interactive", "repository" : { "type" : "git", "url" : "https://github.com/briandfoy/io-interactive", "web" : "https://github.com/briandfoy/io-interactive" } }, "version" : "1.027", "x_serialization_backend" : "JSON::PP version 4.16" }