—=pod
=encoding utf-8
=head1 PURPOSE
Test that inlined type checks don't generate issuing warning when compiled
in packages that override built-ins.
=head1 SEE ALSO
=head1 AUTHOR
Toby Inkster E<lt>tobyink@cpan.orgE<gt>.
=head1 COPYRIGHT AND LICENCE
This software is copyright (c) 2020-2025 by Toby Inkster.
This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
=cut
use
strict;
use
warnings;
use
Test::More;
use
Test::Warnings;
{
}
BEGIN {
$ENV
{PERL_ONLY} = 1 };
# no XS
{
has
_data
=> (
is
=>
'ro'
,
isa
=> HashRef[Str],
required
=> 1,
init_arg
=>
'data'
,
);
sub
values
{
@_
==1 or
die
'too many parameters'
;
CORE::
values
%{
shift
->_data};
}
sub
keys
{
@_
==1 or
die
'too many parameters'
;
CORE::
keys
%{
shift
->_data};
}
}
my
$obj
= Foo->new(
data
=> {
foo
=> 42});
"$_\n"
for
$obj
->
values
;
ok 1;
done_testing;