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: 18.224.72.25
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : runtime_roles_and_nonmoose.t
use strict;
use warnings;

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


{
    package Dog;
    use Moose::Role;

    sub talk { 'woof' }

    package Foo;
    use Moose;

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

    no Moose;

    package Bar;

    sub new {
      return bless {}, shift;
    }
}

my $bar = Bar->new;
isa_ok($bar, 'Bar');

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

ok(!$bar->can( 'talk' ), "... the role is not composed yet");

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

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

ok($bar->can('talk'), "... the role is now composed at the object level");

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

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

done_testing;
© 2025 GrazzMean