Revision: | 1.6.8.1 |
Committed: | Thu Mar 13 12:54:50 2008 UTC (17 years, 1 month ago) by muzaffar |
Content type: | text/plain |
Branch: | SCRAM_V2_0 |
CVS Tags: | V2_2_2, V2_2_2_pre4, V2_2_2_pre3, V2_2_2_pre2, V2_2_2_pre1, V2_2_2-pre1, V2_2_1, forV2_2_1, V2_2_0, sm100112, V2_1_4, V2_1_3, V2_1_2, V2_1_1, V2_1_0, V2_0_6, V2_0_5, V2_0_4, V2_0_4_relcand2, V2_0_4_relcand1, V2_0_3, V2_0_3_relcand3, V2_0_3_relcand2, V2_0_3_relcand1, V2_0_2, V2_0_2_relcand1, V2_0_1, V2_0_1_relcand4, V2_0_1_relcand3, V2_0_1_relcand2, V2_0_1_relcand1, V2_0_0_relcand4, V2_0_0, V2_0_0_relcand3, V2_0_0_relcand2, V2_0_0_relcand1 |
Changes since 1.6: | +24 -71 lines |
Log Message: | scram v2.0 for multiple arch support and big lib stuff |
# | User | Rev | Content |
---|---|---|---|
1 | williamc | 1.2 | package ActiveDoc::SimpleURLDoc; |
2 | use ActiveDoc::SimpleDoc; | ||
3 | require 5.001; | ||
4 | @ISA=qw(ActiveDoc::SimpleDoc); | ||
5 | |||
6 | sashby | 1.6 | sub new() |
7 | { | ||
8 | my $class=shift; | ||
9 | my $self={}; | ||
10 | bless $self, $class; | ||
11 | return $self; | ||
12 | } | ||
13 | muzaffar | 1.6.8.1 | |
14 | sub fullpath () | ||
15 | sashby | 1.6 | { |
16 | my $self=shift; | ||
17 | muzaffar | 1.6.8.1 | my $src=shift; |
18 | $src=~s/^\s*file://; | ||
19 | my $base=$self->{urlbase}; | ||
20 | if ($base ne "") {$src="${base}/${src}";} | ||
21 | return $src; | ||
22 | sashby | 1.6 | } |
23 | |||
24 | sub urldownload() | ||
25 | { | ||
26 | my $self=shift; | ||
27 | muzaffar | 1.6.8.1 | my $src=$self->fullpath(shift); |
28 | my $des=shift; | ||
29 | $des=~s/^\s*file://; | ||
30 | use Utilities::AddDir; | ||
31 | if (-f $src) | ||
32 | sashby | 1.6 | { |
33 | muzaffar | 1.6.8.1 | use File::Basename; |
34 | use File::Copy; | ||
35 | Utilities::AddDir::adddir(dirname($des)); | ||
36 | copy($src,$des); | ||
37 | sashby | 1.6 | } |
38 | muzaffar | 1.6.8.1 | elsif (-d $src) |
39 | sashby | 1.6 | { |
40 | muzaffar | 1.6.8.1 | Utilities::AddDir::copydir($src,$des); |
41 | sashby | 1.6 | } |
42 | } | ||
43 | williamc | 1.2 | |
44 | # ------------------------ Tag Routines ------------------------------- | ||
45 | sashby | 1.6 | sub base() |
46 | { | ||
47 | my $self=shift; | ||
48 | my (%attributes)=@_; | ||
49 | muzaffar | 1.6.8.1 | if (!exists $self->{configurl}){$self->{configurl}=[];} |
50 | my $url=$attributes{'url'}; | ||
51 | $url=~s/^\s*file://; | ||
52 | push @{$self->{configurl}},$url; | ||
53 | $self->{urlbase}=$url; | ||
54 | sashby | 1.6 | } |
55 | |||
56 | sub base_() | ||
57 | { | ||
58 | my $self=shift; | ||
59 | muzaffar | 1.6.8.1 | $self->{urlbase}=pop @{$self->{configurl}}; |
60 | sashby | 1.6 | } |
61 | williamc | 1.2 | |
62 | sashby | 1.6 | 1; |