ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Urlader/Urlader.pm
(Generate patch)

Comparing Urlader/Urlader.pm (file contents):
Revision 1.3 by root, Tue Jan 3 13:28:10 2012 UTC vs.
Revision 1.4 by root, Wed Jan 4 14:19:05 2012 UTC

5=head1 SYNOPSIS 5=head1 SYNOPSIS
6 6
7 use Urlader; 7 use Urlader;
8 8
9=head1 DESCRIPTION 9=head1 DESCRIPTION
10
11Urlader (that's german for "bootloader" btw.) was created out of
12frustration over PAR again not working, again not being flexible enough
13for simple things, and again causing mysterious missing files issues on
14various platforms.
15
16That doesn't mean this module replaces PAR, in fact, you should stay with
17it for many reasons, user-friendlyness is one of them.
18
19However, if you want to make single-file distributions out of your perl
20programs (or python, or C or whatever), and you are prepared to fiddle a
21LOT, this module might provide a tiny step towards your goal. Well, if it
22ever gets finished.
23
24Also, I<nothing in this module is considered very stable yet>, and it's
25far from feature-complete.
26
27Having said all that, Urlader basically provides three services:
28
29=over 4
30
31=item A simple archiver that packs a directory tree into a single file.
32
33=item A small C program that works on windows and unix, which unpacks an attached
34archive and runs a program.
35
36=item A perl module support module (I<this one>), that can be used to query
37the runtime environment, find out where to install updates and so on.
38
39=back
40
41=head1 EXAMPLE
42
43How can it be used to provide single-file executables?
44
45So simple, create a directory with everything that's needed, e.g.:
46
47 # find bintree
48 bintree/perl
49 bintree/libperl.so.5.10
50 bintree/run
51 bintree/pm/Guard.pm
52 bintree/pm/auto/Guard/Guard.so
53
54 # cat bintree/run
55 @INC = ("pm", "."); # "." works around buggy AutoLoader
56 use Guard;
57 guard { warn "hello, world!\n" }; # just to show off
58 exit 0; # tell the urlader that everything was fine
59
60Then pack it:
61
62 # wget http://urlader.schmorp.de/prebuilt/1.0/linux-x86
63 # urlader-util --urlader linux-x86 --pack myprog ver1_000 bintree \
64 LD_LIBRARY_PATH=. ./perl run \
65 >myprog
66 # chmod 755 myprog
67
68=head1 CONCEPTS
69
70=over 4
71
72=item urlader
73
74A small (hopefully) and relatively portable (hopefully) binary that is
75prepended to a pack file to make it executable.
76
77You can build it yourself from sources (see F<prebuilt/Makefile> in the
78distribution) or use one of the precompiled ones at:
79
80 http://urlader.schmorp.de/prebuilt/1.0/
81
82The F<README> there has further information on the binaries provided.
83
84=item exe_id
85
86A string that uniquely identifies your program - all branches of it. It
87must consist of the characters C<A-Za-z0-9_-> only and should be a valid
88directory name on all systems you want to deploy on.
89
90=item exe_ver
91
92A string the uniquely identifies the contents of the archive, i.e. the
93version. It has the same restrictions as the C<exe_id>, and should be
94fixed-length, as Urlader assumes lexicographically higher versions are
95newer, and thus preferable.
96
97=item pack file (archive)
98
99This contains the C<exe_id>, the C<exe_ver>, a number of environment
100variable assignments, the program name to execute, the initial arguments
101it receives, and finally, a list of files (with contents :) and
102directories.
103
104=item override
105
106=back
107
108=head1 FUNCTIONS AND VARIABLES IN THIS MODULE
10 109
11=over 4 110=over 4
12 111
13=cut 112=cut
14 113

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines