Dre4m Shell
Server IP : 85.214.239.14  /  Your IP : 216.73.216.60
Web Server : Apache/2.4.65 (Debian)
System : Linux h2886529.stratoserver.net 4.9.0 #1 SMP Mon Sep 30 15:36:27 MSK 2024 x86_64
User : www-data ( 33)
PHP Version : 8.2.29
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON  |  Sudo : ON  |  Pkexec : OFF
Directory :  /proc/3/cwd/usr/share/doc/libvariable-magic-perl/examples/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ HOME SHELL ]     

Current File : /proc/3/cwd/usr/share/doc/libvariable-magic-perl/examples/magic.pl
#!/usr/bin/perl

use strict;
use warnings;

use lib qw<blib/arch blib/lib>;
use Variable::Magic qw<wizard cast dispell>;

sub foo { print STDERR "got ${$_[0]}!\n" }
my $bar = sub { ++${$_[0]}; print STDERR "now set to ${$_[0]}!\n"; };

my $a = 1;
{
 my $wiz = wizard get  => \&foo,
                  set  => $bar,
                  free => sub { print STDERR "deleted!\n"; };
 cast $a, $wiz, qw<a b c>;
 ++$a;              # "got 1!", "now set to 3!"
 dispell $a, $wiz;
 cast $a, $wiz;
 my $b = 123;
 cast $b, $wiz;
}                   # "deleted!"
my $b = $a;         # "got 3!"
$a = 3;             # "now set to 4!"
$b = 3;             # (nothing)

Anon7 - 2022
AnonSec Team