shell bypass 403

GrazzMean Shell

: /usr/share/doc/perl-Pod-Snippets/eg/ [ 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.226.180.147
User: edustar (269686) | Group: tty (888)
Safe Mode: OFF
Disable Function:
NONE

name : ClassWithTestsAtTheEnd.pm
#!perl -w

package ClassWithTestsAtTheEnd;

use strict;

=head1 NAME

B<ClassWithTestsAtTheEnd> - Demonstrating putting synopsis tests at
the end of an object class, L<perlmodlib>-style

=head1 SYNOPSIS

=for test "synopsis" begin

  my $foo = new ClassWithTestsAtTheEnd;

  $foo->zonk();

=for test "synopsis" end

=head1 DESCRIPTION

This is a dud class to demonstrate a particular use of
L<Pod::Snippets> that its author finds convenient (nay: way groovy
actually).

First we have some foo-ness so that we can pretend we are a real
package.

=cut

sub new { bless {}, shift }

sub zonk { "GLORPS" }

sub foo { "barracuda" }

=head1 TEST SUITE

The test suite is introduced by the "unless caller" mantra straight
from L<perlmodlib>.  "unless caller" means that the test suite won't
even be compiled if we have a caller, that is, the library is being
invoked with "use" or "require".  If one executes the library directly
(as in C<perl ClassWithTestsAtTheEnd.pm>), the test suite is fired up.

=cut

eval join('',<main::DATA>) || die $@ unless caller();

1;

__END__

=pod

We first put ourselves into a neutral package (eg "main") because the
name of the package you are in at the beginning of an eval "string" is
not consistent between Perl 5.6 and 5.8.

=cut

package main;

use strict;

=pod

Now we do some testing.

=cut

use Test::More tests => 3;

is(1 + 1, 2, "hooray, mathematics are still alive!");

like(ClassWithTestsAtTheEnd->foo(), qr/bar/,
     "your usual run-off-the-mill unit tests");

=pod

But we also want to test the synopsis, right? It's also source code,
right? Right.

=cut

use Pod::Snippets;

=pod

Lo and behold, the <main::DATA> pseudo-file descriptor is seekable!
This, people, is why I B<so> love Perl :-)

=cut

seek(DATA, 0, 0);

my $snips = Pod::Snippets->load(\*DATA, -filename => $0,
                                -markup => "test");

my $code_snippet = $snips->as_code("synopsis");

my $result = eval $code_snippet . "\$foo;\n"; die $@ if $@;

like($result->foo(), qr/bar/);

=head1 THAT'S ALL FOLKS!

I can has Kwalitee now?

=cut

© 2025 GrazzMean