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 :  /proc/self/root/usr/share/doc/perl-Moose/t/bugs/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/share/doc/perl-Moose/t/bugs/attribute_trait_parameters.t
use strict;
use warnings;

use Test::More;
use Test::Requires 'Test::Output';  # skip all if not installed

{
    package R;
    use Moose::Role;

    sub method { }
}

{
    package C;
    use Moose;

    ::stderr_is{
        has attr => (
            is => 'ro',
            traits => [
                R => { ignored => 1 },
            ],
        );
    } q{}, 'no warning with foreign parameterized attribute traits';

    ::stderr_is{
        has alias_attr => (
            is => 'ro',
            traits => [
                R => { -alias => { method => 'new_name' } },
            ],
        );
    } q{}, 'no warning with -alias parameterized attribute traits';

    ::stderr_is{
        has excludes_attr => (
            is => 'ro',
            traits => [
                R => { -excludes => ['method'] },
            ],
        );
    } q{}, 'no warning with -excludes parameterized attribute traits';
}

done_testing;

Hry