BEGIN {
chdir 't' if -d 't';
- @INC = '../lib';
require './test.pl';
+ @INC = () unless is_miniperl();
+ unshift @INC, qw '../lib ../cpan/Text-ParseWords/lib';
require Config; # load these before we mess with *CORE::GLOBAL::require
require 'Config_heavy.pl'; # since runperl will need them
}
-plan tests => 33;
+plan tests => 35;
#
# This file tries to test builtin override using CORE::GLOBAL
stderr => 1),
qr/Too many arguments/,
'`` does not ignore &CORE::GLOBAL::readpipe aliased to a constant';
+like runperl(prog => 'use constant foo=>1; '
+ .'BEGIN { *{q|CORE::GLOBAL::readline|} = \&{q|foo|};1}'
+ .'warn <a>',
+ stderr => 1),
+ qr/Too many arguments/,
+ '<> does not ignore &CORE::GLOBAL::readline aliased to a constant';
+
+is runperl(prog => 'use constant t=>42; '
+ .'BEGIN { *{q|CORE::GLOBAL::time|} = \&{q|t|};1}'
+ .'print time, chr 10',
+ stderr => 1),
+ "42\n",
+ 'keywords respect global constant overrides';