Skip to content

Instantly share code, notes, and snippets.

@syohex
Created June 24, 2011 13:29
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save syohex/1044762 to your computer and use it in GitHub Desktop.
Save syohex/1044762 to your computer and use it in GitHub Desktop.
Failed IO::Prompt::prompt in Perl-5.14
#!perl
use strict;
use warnings;
package Test;
use IO::Prompt;
sub test {
my $input = prompt "input >> ";
print "$input\n";
}
package main;
Test::test;
syohei@gibson:% ~/perl5/perlbrew/perls/perl-5.12.3/bin/perl5.12.3 prompt.pl
input >> aaaa
aaaa
syohei@gibson:% ~/perl5/perlbrew/perls/perl-5.14.1/bin/perl5.14.1 prompt.pl
Can't call method "opened" without a package or object reference at /Users/syohei/perl5/perlbrew/perls/perl-5.14.1/lib/site_perl/5.14.1/IO/Prompt.pm line 188.
@syohex
Copy link
Author

syohex commented Jun 9, 2012

Hi.

You should use IO::Prompter or IO::Prompt::Simple, because IO::Prompt is not maintenance now. Those modules do not have this problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment