line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Orze::Drivers::Copy; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
1357
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
52
|
|
4
|
1
|
|
|
1
|
|
7
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
5
|
use File::Copy::Recursive qw/rcopy/; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
59
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use base "Orze::Drivers"; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
187
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Orze::Drivers::Copy - Create a page by copying a file |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
Create a page by copying a file from the C directory to the |
17
|
|
|
|
|
|
|
C directory. |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=head1 EXAMPLE |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
extension="png" |
23
|
|
|
|
|
|
|
driver="Copy"> |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This snippet of an xml project description copy the file |
27
|
|
|
|
|
|
|
C to C |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 METHODS |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head2 process |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Do the real processing |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=cut |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
sub process { |
38
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
my $page = $self->{page}; |
41
|
|
|
|
|
|
|
|
42
|
0
|
|
|
|
|
|
my ($source, $target) = $self->paths($page->att('name')); |
43
|
0
|
|
|
|
|
|
rcopy($source, $target); |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
1; |