File Coverage

blib/lib/PAR.pm
Criterion Covered Total %
statement 261 431 60.5
branch 79 208 37.9
condition 24 86 27.9
subroutine 39 50 78.0
pod 0 6 0.0
total 403 781 51.6


line stmt bran cond sub pod time code
1             package PAR;
2              
3             our $VERSION = '1.021';
4              
5 4     4   3017590 use 5.008009;
  4         17  
6 4     4   24 use strict;
  4         25  
  4         153  
7 4     4   25 use warnings;
  4         8  
  4         309  
8 4     4   44 use Config;
  4         29  
  4         247  
9 4     4   20 use Carp qw/croak/;
  4         12  
  4         617  
10              
11             # If the 'prefork' module is available, we
12             # register various run-time loaded modules with it.
13             # That way, there is more shared memory in a forking
14             # environment.
15             BEGIN {
16 4 50   4   413 if (eval 'require prefork') {
17 0         0 prefork->import($_) for qw/
18             Archive::Zip
19             File::Glob
20             File::Spec
21             File::Temp
22             Fcntl
23             LWP::Simple
24             PAR::Heavy
25             /;
26             # not including Archive::Unzip::Burst which only makes sense
27             # in the context of a PAR::Packer'ed executable anyway.
28             }
29             }
30              
31 4     4   2029 use PAR::SetupProgname;
  4         12  
  4         157  
32 4     4   2041 use PAR::SetupTemp;
  4         12  
  4         521  
33              
34             =head1 NAME
35              
36             PAR - Perl Archive Toolkit
37              
38             =head1 SYNOPSIS
39              
40             (If you want to make an executable that contains all module, scripts and
41             data files, please consult the L utility instead. L used to be
42             part of the PAR distribution but is now shipped as part of the L
43             distribution instead.)
44              
45             Following examples assume a F file in Zip format.
46              
47             To use F from F<./foo.par>:
48              
49             % perl -MPAR=./foo.par -MHello
50             % perl -MPAR=./foo -MHello # the .par part is optional
51              
52             Same thing, but search F in C<@INC>:
53              
54             % perl -MPAR -Ifoo.par -MHello
55             % perl -MPAR -Ifoo -MHello # ditto
56              
57             Following paths inside the PAR file are searched:
58              
59             /lib/
60             /arch/
61             /i386-freebsd/ # i.e. $Config{archname}
62             /5.8.0/ # i.e. $Config{version}
63             /5.8.0/i386-freebsd/ # both of the above
64             /
65              
66             PAR files may also (recursively) contain other PAR files.
67             All files under following paths will be considered as PAR
68             files and searched as well:
69              
70             /par/i386-freebsd/ # i.e. $Config{archname}
71             /par/5.8.0/ # i.e. $Config{version}
72             /par/5.8.0/i386-freebsd/ # both of the above
73             /par/
74              
75             Run F