ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Urlader/Urlader.pm
Revision: 1.3
Committed: Tue Jan 3 13:28:10 2012 UTC (12 years, 4 months ago) by root
Branch: MAIN
Changes since 1.2: +7 -5 lines
Log Message:
*** empty log message ***

File Contents

# User Rev Content
1 root 1.1 =head1 NAME
2    
3     Urlader - installer-less single-file independent executables
4    
5     =head1 SYNOPSIS
6    
7     use Urlader;
8    
9     =head1 DESCRIPTION
10    
11     =over 4
12    
13     =cut
14    
15     package Urlader;
16    
17     use common::sense;
18    
19     BEGIN {
20     our $VERSION = '0.2';
21    
22     use XSLoader;
23     XSLoader::load __PACKAGE__, $VERSION;
24     }
25    
26 root 1.3 our $URLADER_VERSION; # only ste when running under urlader
27 root 1.1 our $DATADIR;
28     our $EXE_ID;
29     our $EXE_VER;
30     our $EXE_DIR; # %AppData%/urlader/EXE_ID
31     our $EXECDIR; # %AppData%/urlader/EXE_ID/i-EXE_VER
32    
33     sub _get_env {
34 root 1.3 $URLADER_VERSION = getenv "URLADER_VERSION";
35     $DATADIR = getenv "URLADER_DATADIR";
36     $EXE_ID = getenv "URLADER_EXE_ID";
37     $EXE_VER = getenv "URLADER_EXE_VER";
38     $EXE_DIR = getenv "URLADER_EXE_DIR"; # %AppData%/urlader/EXE_ID
39     $EXECDIR = getenv "URLADER_EXECDIR"; # %AppData%/urlader/EXE_ID/i-EXE_VER
40 root 1.1 }
41    
42     _get_env;
43    
44     sub set_exe_info($$) {
45 root 1.2 _set_datadir unless defined getenv "URLADER_DATADIR";
46 root 1.1 &_set_exe_info;
47     _get_env;
48     }
49    
50    
51     1;
52    
53     =back
54    
55     =head1 AUTHOR
56    
57     Marc Lehmann <schmorp@schmorp.de>
58     http://home.schmorp.de/
59    
60     =cut
61