line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::Implode; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
App::Implode - Pack an application into a single runable file |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=head1 VERSION |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
0.03 |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
=head1 DESCRIPTION |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
L is an alternative to L and L. It |
14
|
|
|
|
|
|
|
works by using L to build all the dependencies and then bundle all the |
15
|
|
|
|
|
|
|
deps to a single executable file. |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
It is very important that all the dependencies are documented in a |
18
|
|
|
|
|
|
|
L. Example C: |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
requires "perl" => "5.12.0"; |
21
|
|
|
|
|
|
|
requires "Mojolicious" => "5.00"; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
=head1 SYNOPSIS |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head2 Generetor |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
$ cd my-project |
28
|
|
|
|
|
|
|
$ implode myapp.pl out.pl |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head2 Consumer |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
It is possible to set environment variables on the consumer side to instruct |
33
|
|
|
|
|
|
|
how the code will be "exploded". |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
$ out.pl |
36
|
|
|
|
|
|
|
$ APP_EXPLODE_VERBOSE=1 out.pl |
37
|
|
|
|
|
|
|
$ APP_EXPLODE_DIR=/extract/files/here out.pl |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=over 4 |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=item * APP_EXPLODE_VERBOSE |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
Set this to a true value to get debug output. |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=item * APP_EXPLODE_DIR |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
The default is to put the extracted files in a default |
48
|
|
|
|
|
|
|
L. A custom C can be specified |
49
|
|
|
|
|
|
|
if to override that behavior. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=back |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=head1 CAVEAT |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
L will put all the requirements into an bzip2'ed archive, and |
56
|
|
|
|
|
|
|
write it into the generated file, in the C<__END__> section. This means that |
57
|
|
|
|
|
|
|
you cannot use this section in the source script. |
58
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
=cut |
60
|
|
|
|
|
|
|
|
61
|
1
|
|
|
1
|
|
413
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
28
|
|
62
|
1
|
|
|
1
|
|
3
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
34
|
|
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
our $VERSION = '0.03'; |
65
|
|
|
|
|
|
|
|
66
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
67
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
Copyright (C) 2014, Jan Henning Thorsen |
69
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it under |
71
|
|
|
|
|
|
|
the terms of the Artistic License version 2.0. |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=head1 AUTHOR |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
Jan Henning Thorsen - C |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |