K2LL33D SHELL

 Apache/2.4.7 (Ubuntu)
 Linux sman1baleendah 3.13.0-24-generic #46-Ubuntu SMP Thu Apr 10 19:11:08 UTC 2014 x86_64
 uid=33(www-data) gid=33(www-data) groups=33(www-data)
 safemode : OFF
 MySQL: ON | Perl: ON | cURL: OFF | WGet: ON
  >  / usr / share / perl / 5.18.2 / Module / CoreList /
server ip : 104.21.89.46

your ip : 172.70.126.43

H O M E


Filename/usr/share/perl/5.18.2/Module/CoreList/TieHashDelta.pm
Size1.62 kb
Permissionrw-r--r--
Ownerroot : root
Create time27-Apr-2025 10:10
Last modified21-Nov-2018 01:11
Last accessed07-Jul-2025 12:39
Actionsedit | rename | delete | download (gzip)
Viewtext | code | image
# For internal Module::CoreList use only.
package Module::CoreList::TieHashDelta;
use strict;
use vars qw($VERSION);

$VERSION = "3.03";

sub TIEHASH {
my ($class, $changed, $removed, $parent) = @_;

return bless {
changed => $changed,
removed => $removed,
parent => $parent,
keys_inflated => 0,
}, $class;
}

sub FETCH {
my ($self, $key) = @_;

if (exists $self->{changed}{$key}) {
return $self->{changed}{$key};
} elsif (exists $self->{removed}{$key}) {
return undef;
} elsif (defined $self->{parent}) {
return $self->{parent}{$key};
}
return undef;
}

sub EXISTS {
my ($self, $key) = @_;

if (exists $self->{changed}{$key}) {
return 1;
} elsif (exists $self->{removed}{$key}) {
return '';
} elsif (defined $self->{parent}) {
return exists $self->{parent}{$key};
}
return '';
}

sub FIRSTKEY {
my ($self) = @_;

if (not $self->{keys_inflated}) {
# This inflates the whole set of hashes... Somewhat expensive, but saves
# many tied hash calls later.
my @parent_keys;
if (defined $self->{parent}) {
@parent_keys = keys %{$self->{parent}};
}

@parent_keys = grep !exists $self->{removed}{$_}, @parent_keys;
for my $key (@parent_keys) {
next if exists $self->{changed}->{$key};
$self->{changed}{$key} = $self->{parent}{$key};
}

$self->{keys_inflated} = 1;
}

keys %{$self->{changed}}; # reset each
$self->NEXTKEY;
}

sub NEXTKEY {
my ($self) = @_;
each %{$self->{changed}};
}

1;