shell bypass 403

GrazzMean Shell

: /usr/share/doc/perl-Moose/t/attributes/ [ drwxr-xr-x ]
Uname: Linux web3.us.cloudlogin.co 5.10.226-xeon-hst #2 SMP Fri Sep 13 12:28:44 UTC 2024 x86_64
Software: Apache
PHP version: 8.1.31 [ PHP INFO ] PHP os: Linux
Server Ip: 162.210.96.117
Your Ip: 18.221.124.202
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : accessor_overwrite_warning.t
use strict;
use warnings;

use Test::More;

use Test::Requires 'Test::Output';

my $file = __FILE__;

{
    package Bar;
    use Moose;

    has has_attr => (
        is => 'ro',
    );

    ::stderr_like(
        sub {
            has attr => (
                is        => 'ro',
                predicate => 'has_attr',
            );
        },
        qr/
           \QYou are overwriting a reader (has_attr) for the has_attr attribute\E
           \Q (defined at $file line \E\d+\)
           \Q with a new predicate method for the attr attribute\E
           \Q (defined at $file line \E\d+\)
          /x,
        'overwriting an accessor for another attribute causes a warning'
    );
}

{
    package Foo;
    use Moose;

    ::stderr_like(
        sub {
            has buz => (
                reader => 'my_buz',
                writer => 'my_buz',
            );
        },
        qr/
           \QYou are overwriting a reader (my_buz) for the buz attribute\E
           \Q (defined at $file line \E\d+\)
           \Q with a new writer method for the buz attribute\E
           \Q (defined at $file line \E\d+\)
          /x,
        'overwriting an accessor for the same attribute causes a warning'
    );
}

{
    package Baz;
    use Moose;

    # This tests where Moose would also make a reader named buz for this
    # attribute, leading to an overwrite warning.
    ::stderr_is(
        sub {
            has buz => (
                is       => 'rw',
                accessor => 'buz',
                writer   => '_set_buz',
            );
        },
        q{},
        'no warning with rw attribute that has both an accessor and a writer'
    );
}

done_testing;
© 2025 GrazzMean