Server : Apache/2.4.43 (Win64) OpenSSL/1.1.1g PHP/7.4.6 System : Windows NT USER-PC 6.1 build 7601 (Windows 7 Professional Edition Service Pack 1) AMD64 User : User ( 0) PHP Version : 7.4.6 Disable Function : NONE Directory : C:/xampp/perl/vendor/lib/Win32/Exe/ |
# Copyright 2004 by Audrey Tang <cpan@audreyt.org> package Win32::Exe::Base; use strict; use base 'Parse::Binary'; use constant BASE_CLASS => 'Win32::Exe'; use constant FORMAT => ( Data => 'a', ); sub align { my ($self, $value, $boundary) = @_; my $n = ($value % $boundary) or return $value; return($value + $boundary - $n); } sub pad { my ($self, $value, $bounary) = @_; my $x = length($value) % $bounary or return ''; return "\0" x ($bounary - $x); } sub decode_ucs2 { my ($self, $string) = @_; return join('', map chr($_), unpack("v*", $string)); } sub encode_ucs2 { my ($self, $string) = @_; return pack("v*", map ord($_), split(//, $string)); } 1;