Linux cpanel.rrshost.in 5.15.0-25-generic #25-Ubuntu SMP Wed Mar 30 15:54:22 UTC 2022 x86_64
Apache
: 109.123.238.221 | : 172.70.126.27
128 Domain
8.2.28
aev999
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
share /
perl /
5.34.0 /
ExtUtils /
[ HOME SHELL ]
Name
Size
Permission
Action
CBuilder
[ DIR ]
drwxr-xr-x
Command
[ DIR ]
drwxr-xr-x
Constant
[ DIR ]
drwxr-xr-x
Liblist
[ DIR ]
drwxr-xr-x
MakeMaker
[ DIR ]
drwxr-xr-x
ParseXS
[ DIR ]
drwxr-xr-x
Typemaps
[ DIR ]
drwxr-xr-x
CBuilder.pm
8.67
KB
-rw-r--r--
Command.pm
7.63
KB
-rw-r--r--
Constant.pm
14.7
KB
-rw-r--r--
Embed.pm
12.57
KB
-rw-r--r--
Install.pm
39.92
KB
-rw-r--r--
Installed.pm
14
KB
-rw-r--r--
Liblist.pm
9.29
KB
-rw-r--r--
MANIFEST.SKIP
1.17
KB
-rw-r--r--
MM.pm
2.13
KB
-rw-r--r--
MM_AIX.pm
1.46
KB
-rw-r--r--
MM_Any.pm
80.97
KB
-rw-r--r--
MM_BeOS.pm
1.04
KB
-rw-r--r--
MM_Cygwin.pm
4.03
KB
-rw-r--r--
MM_DOS.pm
1.04
KB
-rw-r--r--
MM_Darwin.pm
1.45
KB
-rw-r--r--
MM_MacOS.pm
901
B
-rw-r--r--
MM_NW5.pm
5.35
KB
-rw-r--r--
MM_OS2.pm
3.15
KB
-rw-r--r--
MM_OS390.pm
2.22
KB
-rw-r--r--
MM_QNX.pm
907
B
-rw-r--r--
MM_UWIN.pm
994
B
-rw-r--r--
MM_Unix.pm
111.19
KB
-rw-r--r--
MM_VMS.pm
66.68
KB
-rw-r--r--
MM_VOS.pm
762
B
-rw-r--r--
MM_Win32.pm
14.71
KB
-rw-r--r--
MM_Win95.pm
1.26
KB
-rw-r--r--
MY.pm
676
B
-rw-r--r--
MakeMaker.pm
106.93
KB
-rw-r--r--
Manifest.pm
22.94
KB
-rw-r--r--
Miniperl.pm
6.48
KB
-rw-r--r--
Mkbootstrap.pm
3.2
KB
-rw-r--r--
Mksymlists.pm
10.75
KB
-rw-r--r--
PL2Bat.pm
5.1
KB
-rw-r--r--
Packlist.pm
8.34
KB
-rw-r--r--
ParseXS.pm
65.36
KB
-rw-r--r--
ParseXS.pod
4.3
KB
-rw-r--r--
Typemaps.pm
26.26
KB
-rw-r--r--
testlib.pm
911
B
-rw-r--r--
typemap
11.05
KB
-rw-r--r--
xsubpp
4.95
KB
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : PL2Bat.pm
package ExtUtils::PL2Bat; $ExtUtils::PL2Bat::VERSION = '0.004'; use strict; use warnings; use 5.006; use Config; use Carp qw/croak/; # In core, we can't use any other modules except those that already live in # lib/, so Exporter is not available to us. sub import { my ($self, @functions) = @_; @functions = 'pl2bat' if not @functions; my $caller = caller; for my $function (@functions) { no strict 'refs'; *{"$caller\::$function"} = \&{$function}; } } sub pl2bat { my %opts = @_; # NOTE: %0 is already enclosed in doublequotes by cmd.exe, as appropriate $opts{ntargs} = '-x -S %0 %*' unless exists $opts{ntargs}; $opts{otherargs} = '-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9' unless exists $opts{otherargs}; $opts{stripsuffix} = qr/\.plx?/ unless exists $opts{stripsuffix}; if (not exists $opts{out}) { $opts{out} = $opts{in}; $opts{out} =~ s/$opts{stripsuffix}$//i; $opts{out} .= '.bat' unless $opts{in} =~ /\.bat$/i or $opts{in} eq '-'; } my $head = <<"EOT"; \@rem = '--*-Perl-*-- \@set "ErrorLevel=" \@if "%OS%" == "Windows_NT" \@goto WinNT \@perl $opts{otherargs} \@set ErrorLevel=%ErrorLevel% \@goto endofperl :WinNT \@perl $opts{ntargs} \@set ErrorLevel=%ErrorLevel% \@if NOT "%COMSPEC%" == "%SystemRoot%\\system32\\cmd.exe" \@goto endofperl \@if %ErrorLevel% == 9009 \@echo You do not have Perl in your PATH. \@goto endofperl \@rem '; EOT $head =~ s/^\s+//gm; my $headlines = 2 + ($head =~ tr/\n/\n/); my $tail = <<'EOT'; __END__ :endofperl @set "ErrorLevel=" & @goto _undefined_label_ 2>NUL || @"%COMSPEC%" /d/c @exit %ErrorLevel% EOT $tail =~ s/^\s+//gm; my $linedone = 0; my $taildone = 0; my $linenum = 0; my $skiplines = 0; my $start = $Config{startperl}; $start = '#!perl' unless $start =~ /^#!.*perl/; open my $in, '<', $opts{in} or croak "Can't open $opts{in}: $!"; my @file = <$in>; close $in; foreach my $line ( @file ) { $linenum++; if ( $line =~ /^:endofperl\b/ ) { if (!exists $opts{update}) { warn "$opts{in} has already been converted to a batch file!\n"; return; } $taildone++; } if ( not $linedone and $line =~ /^#!.*perl/ ) { if (exists $opts{update}) { $skiplines = $linenum - 1; $line .= '#line '.(1+$headlines)."\n"; } else { $line .= '#line '.($linenum+$headlines)."\n"; } $linedone++; } if ( $line =~ /^#\s*line\b/ and $linenum == 2 + $skiplines ) { $line = ''; } } open my $out, '>', $opts{out} or croak "Can't open $opts{out}: $!"; print $out $head; print $out $start, ( $opts{usewarnings} ? ' -w' : '' ), "\n#line ", ($headlines+1), "\n" unless $linedone; print $out @file[$skiplines..$#file]; print $out $tail unless $taildone; close $out; return $opts{out}; } 1; # ABSTRACT: Batch file creation to run perl scripts on Windows __END__ =pod =encoding UTF-8 =head1 NAME ExtUtils::PL2Bat - Batch file creation to run perl scripts on Windows =head1 VERSION version 0.004 =head1 OVERVIEW This module converts a perl script into a batch file that can be executed on Windows/DOS-like operating systems. This is intended to allow you to use a Perl script like regular programs and batch files where you just enter the name of the script [probably minus the extension] plus any command-line arguments and the script is found in your B<PATH> and run. =head1 FUNCTIONS =head2 pl2bat(%opts) This function takes a perl script and write a batch file that contains the script. This is sometimes necessary =over 8 =item * C<in> The name of the script that is to be batchified. This argument is mandatory. =item * C<out> The name of the output batch file. If not given, it will be generated using C<in> and C<stripsuffix>. =item * C<ntargs> Arguments to invoke perl with in generated batch file when run from Windows NT. Defaults to S<'-x -S %0 %*'>. =item * C<otherargs> Arguments to invoke perl with in generated batch file except when run from Windows NT (ie. when run from DOS, Windows 3.1, or Windows 95). Defaults to S<'-x -S "%0" %1 %2 %3 %4 %5 %6 %7 %8 %9'>. =item * C<stripsuffix> Strip a suffix string from file name before appending a ".bat" suffix. The suffix is not case-sensitive. It can be a regex or a string and a trailing C<$> is always assumed). Defaults to C<qr/\.plx?/>. =item * C<usewarnings> With the C<usewarnings> option, C<" -w"> is added after the value of C<$Config{startperl}>. If a line matching C</^#!.*perl/> already exists in the script, then it is not changed and the B<-w> option is ignored. =item * C<update> If the script appears to have already been processed by B<pl2bat>, then the script is skipped and not processed unless C<update> was specified. If C<update> is specified, the existing preamble is replaced. =back =head1 ACKNOWLEDGEMENTS This code was taken from Module::Build and then modified; which had taken it from perl's pl2bat script. This module is an attempt at unifying all three implementations. =head1 AUTHOR Leon Timmermans <leont@cpan.org> =head1 COPYRIGHT AND LICENSE This software is copyright (c) 2015 by Leon Timmermans. This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. =cut
Close