shell bypass 403

GrazzMean Shell

: /usr/share/doc/perl-Moose/t/roles/ [ 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: 3.149.253.168
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : runtime_roles_and_attrs.t
use strict;
use warnings;

use Test::More;
use Test::Fatal;


{
    package Dog;
    use Moose::Role;

    sub talk { 'woof' }

    has fur => (
        isa => "Str",
        is  => "rw",
        default => "dirty",
    );

    package Foo;
    use Moose;

    has 'dog' => (
        is   => 'rw',
        does => 'Dog',
    );
}

my $obj = Foo->new;
isa_ok($obj, 'Foo');

ok(!$obj->can( 'talk' ), "... the role is not composed yet");
ok(!$obj->can( 'fur' ), 'ditto');
ok(!$obj->does('Dog'), '... we do not do any roles yet');

isnt( exception {
    $obj->dog($obj)
}, undef, '... and setting the accessor fails (not a Dog yet)' );

Dog->meta->apply($obj);

ok($obj->does('Dog'), '... we now do the Bark role');
ok($obj->can('talk'), "... the role is now composed at the object level");
ok($obj->can('fur'), "it has fur");

is($obj->talk, 'woof', '... got the right return value for the newly composed method');

is( exception {
    $obj->dog($obj)
}, undef, '... and setting the accessor is okay' );

is($obj->fur, "dirty", "role attr initialized");

done_testing;
© 2025 GrazzMean