package Env;
-our $VERSION = '1.00';
+our $VERSION = '1.01';
=head1 NAME
sub FETCHSIZE {
my ($self) = @_;
- my @temp = split($sep, $ENV{$$self});
- return scalar(@temp);
+ return 1 + scalar(() = $ENV{$$self} =~ /\Q$sep\E/g);
}
sub STORESIZE {
return $value;
}
+sub EXISTS {
+ my ($self, $index) = @_;
+ return $index < $self->FETCHSIZE;
+}
+
+sub DELETE {
+ my ($self, $index) = @_;
+ my @temp = split($sep, $ENV{$$self});
+ my $value = splice(@temp, $index, 1, ());
+ $ENV{$$self} = join($sep, @temp);
+ return $value;
+}
+
sub PUSH {
my $self = shift;
my @temp = split($sep, $ENV{$$self});
return $ENV{$$self . ';' . $index};
}
+sub EXISTS {
+ my ($self, $index) = @_;
+ return $index < $self->FETCHSIZE;
+}
+
+sub DELETE { }
+
1;