Lines Matching refs:CORE
3 # This file tests the results of calling subroutines in the CORE::
8 # Other tests for CORE subs are in coresubs.t
54 *{"my$o"} = \&{"CORE::$o"};
56 my $p = prototype "CORE::$o";
62 eval " &CORE::$o(1) ";
69 eval " &CORE::$o(1,2) ";
83 is &{"CORE::$o"}($in), $out, "&$o";
84 lis [&{"CORE::$o"}($in)], [$out], "&$o in list context";
87 is &{"CORE::$o"}(), $out, "&$o with no args";
92 eval " &CORE::$o((1)x($maxargs+1)) ";
101 eval " &CORE::$o((1)x($args-1)) ";
103 eval " &CORE::$o((1)x($args+1)) ";
110 eval " &CORE::$o((1)x($minargs-1)) ";
112 eval " &CORE::$o((1)x($maxargs+1)) ";
118 eval " &CORE::$o(1,2,3) ";
128 eval " &CORE::$o((1)x($minargs-1)) ";
136 eval "&CORE::$o(1,1,1,1,1)";
139 eval " &CORE::$o((1)x(\$1?2:3)) ";
142 eval " &CORE::$o(1,[],1,1) ";
143 like $@, qr/^Type of arg 2 to &CORE::$o must be scalar reference at /,
145 eval " &CORE::$o(1,1,1,1) ";
146 like $@, qr/^Type of arg 2 to &CORE::$o must be scalar reference at /,
148 eval " &CORE::$o(1,bless([], 'sov'),1,1) ";
149 like $@, qr/^Type of arg 2 to &CORE::$o must be scalar reference at /,
155 eval "&CORE::$o(" . join(",", (1) x length $p) . ")";
158 eval " &CORE::$o(" . join(",", (1) x (length($p)-2)) . ") ";
162 eval " &CORE::$o([]$moreargs) ";
163 like $@, qr/^Type of arg 1 to &CORE::$o must be hash reference at /,
165 eval " &CORE::$o(*foo$moreargs) ";
166 like $@, qr/^Type of arg 1 to &CORE::$o must be hash reference at /,
168 eval " &CORE::$o(bless([], 'hov')$moreargs) ";
169 like $@, qr/^Type of arg 1 to &CORE::$o must be hash reference at /,
177 eval " &CORE::$o(1,2) ";
183 eval { &{"CORE::$o"}($3 ? 1 : ()) };
188 eval " &CORE::$o(2$more_args) ";
189 like $@, qr/^Type of arg 1 to &CORE::$o must be reference to one of(?x:
192 eval " &CORE::$o(*STDOUT{IO}$more_args) ";
193 like $@, qr/^Type of arg 1 to &CORE::$o must be reference to one of(?x:
197 eval " &CORE::$o(bless(*DATA{IO}, 'hov')$more_args) ";
198 like $@, qr/^Type of arg 1 to &CORE::$o must be reference to one of(?x:
204 eval " &CORE::$o(\\&scriggle$more_args) ";
205 like $@, qr/^Type of arg 1 to &CORE::$o must be reference to one (?x:
214 eval { &{"CORE::$o"}() };
219 eval " &CORE::$o(\\\@1,2) ";
223 eval " &CORE::$o(2) ";
224 like $@, qr/^Type of arg 1 to &CORE::$o must be array reference at /,
226 eval " &CORE::$o(*STDOUT{IO}) ";
227 like $@, qr/^Type of arg 1 to &CORE::$o must be array reference at /,
230 eval " &CORE::$o(bless(*DATA{IO}, 'aov')) ";
231 like $@, qr/^Type of arg 1 to &CORE::$o must be array reference at /,
234 eval " &CORE::$o(\\&scriggle) ";
235 like $@, qr/^Type of arg 1 to &CORE::$o must be array reference at /,
237 eval " &CORE::$o(\\\$_) ";
238 like $@, qr/^Type of arg 1 to &CORE::$o must be array reference at /,
240 eval " &CORE::$o({}) ";
241 like $@, qr/^Type of arg 1 to &CORE::$o must be array reference at /,
247 eval " &CORE::$o(\\%1,2) ";
250 eval { &{"CORE::$o"}() };
253 eval " &CORE::$o(2) ";
254 like $@, qr/^Type of arg 1 to &CORE::$o must be hash or array (?x:
257 eval " &CORE::$o(*STDOUT{IO}) ";
258 like $@, qr/^Type of arg 1 to &CORE::$o must be hash or array (?x:
262 eval " &CORE::$o(bless(*DATA{IO}, 'hov')) ";
263 like $@, qr/^Type of arg 1 to &CORE::$o must be hash or array (?x:
267 eval " &CORE::$o(\\&scriggle) ";
268 like $@, qr/^Type of arg 1 to &CORE::$o must be hash or array (?x:
271 eval " &CORE::$o(\\\$_) ";
272 like $@, qr/^Type of arg 1 to &CORE::$o must be hash or array (?x:
280 eval " &CORE::$o(1,2) ";
283 eval " &CORE::$o([]) ";
284 like $@, qr/^Type of arg 1 to &CORE::$o must be scalar reference at /,
286 eval " &CORE::$o(1) ";
287 like $@, qr/^Type of arg 1 to &CORE::$o must be scalar reference at /,
289 eval " &CORE::$o(bless([], 'sov')) ";
290 like $@, qr/^Type of arg 1 to &CORE::$o must be scalar reference at /,
299 # Test that &CORE::foo calls without parentheses (no new @_) can handle the
302 &CORE::wantarray;
304 pass('no crash with &CORE::foo when *_{ARRAY} is undef');
328 is &CORE::accept(qw{foo bar}), undef, "&accept";
329 lis [&{"CORE::accept"}(qw{foo bar})], [undef], "&accept in list context";
332 is ref $foo, 'GLOB', 'CORE::accept autovivifies its first argument';
333 is $bar, undef, 'CORE::accept does not autovivify its second argument';
338 'CORE::accept will not accept undef 2nd arg under strict';
339 is ref $foo, 'GLOB', 'CORE::accept autovivs its first arg under strict';
352 is &CORE::bind('foo', 'bear'), undef, "&bind";
353 lis [&CORE::bind('foo', 'bear')], [undef], "&bind in list context";
356 'CORE::bind dies with undef first arg';
361 is &CORE::binmode(qw[foo bar]), undef, "&binmode";
362 lis [&CORE::binmode(qw[foo bar])], [undef], "&binmode in list context";
367 like &CORE::bless([],'parcel'), qr/^parcel=ARRAY/, "&bless";
368 like join(" ", &CORE::bless([],'parcel')), qr/^parcel=ARRAY(?!.* )/,
377 CORE::given(1) {
378 CORE::when(1) {
389 is scalar &CORE::caller, 'hadhad', '&caller';
390 is scalar &CORE::caller(1), 'main', '&caller(1)';
391 lis [&CORE::caller], [caller], '&caller in list context';
393 # may be a different hash for caller vs &CORE::caller, so an eq com-
396 # &CORE::caller works.
397 my @ampcaller = &CORE::caller(1);
409 is &CORE::chmod(), 0, '&chmod with no args';
410 is &CORE::chmod(0666), 0, '&chmod';
411 lis [&CORE::chmod(0666)], [0], '&chmod in list context';
415 is &CORE::chown(), 0, '&chown with no args';
416 is &CORE::chown(1), 0, '&chown with 1 arg';
417 is &CORE::chown(1,2), 0, '&chown';
418 lis [&CORE::chown(1,2)], [0], '&chown in list context';
430 ok &CORE::close($fh), '&CORE::close retval';
433 'effect of &CORE::close';
441 &CORE::close();
443 is $buffalo, "Nasusiro Tokasoni", '&CORE::close with no args';
446 lis [&CORE::close('tototootot')], [''], '&close in list context'; ++$tests;
450 is &CORE::closedir(foo), undef, '&CORE::closedir';
451 lis [&CORE::closedir(foo)], [undef], '&CORE::closedir in list context';
459 is &CORE::connect('foo','bar'), undef, '&connect';
466 CORE::given(1) {
467 CORE::when(1) {
499 is $@, "quinquangle at frob line 6.\n", '&CORE::die'; $tests ++;
531 is runperl(prog => '&CORE::exit; END { print qq-ok\n- }'), "ok\n",
564 is &CORE::fileno(\*STDIN), fileno STDIN, '&CORE::fileno';
565 lis [&CORE::fileno(\*STDIN)], [fileno STDIN], '&CORE::fileno in list cx';
597 ok ! $CORE::{glob}, '*CORE::glob not autovivified yet'; $tests ++;
599 # Make sure ck_glob does not respect the override when &CORE::glob is
601 local *CORE::GLOBAL::glob = sub {};
611 &CORE::gmtime;
662 &CORE::localtime;
748 is &myprototype(\&myprototype), prototype("CORE::prototype"), '&prototype';
762 my $r = &CORE::rand;
767 unlike join(" ", &CORE::rand), qr/ /, '&rand in list context';
768 &cmp_ok(&CORE::rand(78), qw '< 78', '&rand with 1 arg');
877 *myselect = \&CORE::select;
878 is defined prototype &myselect, defined prototype "CORE::select",
970 &CORE::srand;
971 () = &CORE::srand;
1026 &CORE::untie(\$tied);
1161 ADJUST AUTOLOAD BEGIN CHECK CORE DESTROY END INIT UNITCHECK
1176 || (eval{&{"CORE::$word"}}, $@ =~ /cannot be called directly/),
1216 sub file { &CORE::__FILE__ }
1217 sub line { &CORE::__LINE__ } # 5
1218 sub dier { &CORE::die(@_) } # 6
1220 sub main::pakg { &CORE::__PACKAGE__ }
1224 CORE::__DATA__