NAME
Tie::InSecureHash - A tied hash that is API compatible with Tie::SecureHash with namespace-based encapsulation features disabled. This is for debugging. Typically you'll use this in the following manner:
SYNOPSIS
#!/usr/bin/env/perl;
use warnings;
use strict;
use lib 't/go_away';
use Tie::SecureHash;
Then in t/go_away:
package Tie::SecureHash;
use base Tie::InSecureHash;
1;
Now you can use things like Devel::Cycle (temporarily) in your code ...
VERSION
This code derived form v1.03 of Tie::SecureHash released in 1999.
SYNOPSIS
use Tie::SecureHash;
# CREATE AN INSECURE HASH
my %hash;
tie %hash, Tie::InSecureHash;
# CREATE A REFERENCE TO AN INSECURE HASH (BLESSED INTO Tie::InSecureHash!)
my $hashref = Tie::InSecureHash->new();
# CREATE A REFERENCE TO A INSECURE HASH (BLESSED INTO $some_other_class)
my $hashref = Tie::InSecureHash->new($some_other_class);
# CREATE NEW ENTRIES IN THE HASH
package MyClass;
sub new
{
my ($class, %args) = @_
my $self = Tie::InSecureHash->($class);
$self->{MyClass::public} = $args{public};
$self->{MyClass::_protected} = $args{protected};
$self->{MyClass::__private} = $args{private};
return $self;
}
# SAME EFFECT, EASIER SYNTAX...
package MyClass;
sub new
{
my ($class, %args) = @_
my $self = Tie::InSecureHash->($class,
public => $args{public},
_protected => $args{protected},
__private => $args{private},
);
return $self;
}
ACCESS RESTRICTIONS ON ENTRIES
There are none. This code is for debugging only :P
AUTHOR
Damian Conway (damian@cs.monash.edu.au)
Swathes of code deletions by Kieren Diment <zarquon@cpan.org> with help from Glenn Fowler (CEBJYRE).
BUGS AND IRRITATIONS
None here :P
COPYRIGHT
Copyright (c) 1998-2000, Damian Conway. All Rights Reserved.
This module is free software. It may be used, redistributed
and/or modified under the terms of the Perl Artistic License
(see http://www.perl.com/perl/misc/Artistic.html)