Softpedia
 


LINUX CATEGORIES:



GLOBAL PAGES >>
NEWS ARCHIVE >>
SOFTPEDIA REVIEWS >>
MEET THE EDITORS >>
WEEK'S BEST
  • Linux Kernel 3.9.3 / 3....
  • LibreOffice 3.6.6 / 4.0.3
  • MPlayer 1.1.1
  • systemd 204
  • Arch Linux 2013.05.01
  • Blender 2.67a
  • KDE Software Compilatio...
  • CrunchBang Linux Stable...
  • Elementary OS 0.1 / 0.2...
  • SystemRescueCd 3.6.0
  • Home > Linux > Programming > Perl Modules

    Safe::Hole 0.10

    Download button

    No screenshots available
    Downloads: 262  View global page NEW!  Tell us about an update
    User Rating:
    Rated by:
    Poor (1.0/5)
    1 user(s)
    Developer:

    License / Price:

    Last Updated:

    Category:
    Sey Nakajima and Brian McCauley | More programs
    Perl Artistic License / FREE
    December 3rd, 2007, 21:41 GMT
    ROOT / Programming / Perl Modules

     Read user reviews (0)  Refer to a friend  Subscribe

    Safe::Hole description

    Safe::Hole is a Perl module to make a hole to the original main compartment in the Safe compartment.

    Safe::Hole is a Perl module to make a hole to the original main compartment in the Safe compartment.

    SYNOPSIS

    use Safe;
    use Safe::Hole;
    $cpt = new Safe;
    $hole = new Safe::Hole {};
    sub test { Test->test; }
    $Testobj = new Test;
    # $cpt->share('&test'); # alternate as next line
    $hole->wrap(&test, $cpt, '&test');
    # ${$cpt->varglob('Testobj')} = $Testobj; # alternate as next line
    $hole->wrap($Testobj, $cpt, '$Testobj');
    $cpt->reval('test; $Testobj->test;');
    print $@ if $@;
    package Test;
    sub new { bless {},shift(); }
    sub test { my $self = shift; $self->test2; }
    sub test2 { print "Test->test2 calledn"; }

    We can call outside defined subroutines from the Safe compartment
    using share(), or can call methods through the object that is copied
    into the Safe compartment using varglob(). But that subroutines or
    methods are executed in the Safe compartment too, so they cannot call
    another subroutines that are dinamically qualified with the package
    name such as class methods nor can they compile code that uses opcodes
    that are forbidden within the compartment.

    Through Safe::Hole, we can execute outside defined subroutines in the
    original main compartment from the Safe compartment.

    Note that if a subroutine called through Safe::Hole::call does a
    Carp::croak() it will report the error as having occured within
    Safe::Hole. This can be avoided by including Safe::Hole::User in the
    @ISA for the package containing the subroutine.

    Product's homepage

    Requirements:

    · Perl

      


    TAGS:

    compartment hole | Safe compartment | Perl module | Safe | compartment | hole

    Go to top

    WindowsGamesDriversMacLinuxScriptsMobileHandheldNews

    SUBMIT PROGRAM   |   ADVERTISE   |   GET HELP   |   SEND US FEEDBACK   |   RSS FEEDS   |   UPDATE YOUR SOFTWARE   |   ROMANIAN FORUM