line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Orze::Drivers::Section; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
994
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
36
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
26
|
|
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
7
|
use File::Path; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
64
|
|
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
6
|
use base "Orze::Drivers"; |
|
1
|
|
|
|
|
28
|
|
|
1
|
|
|
|
|
172
|
|
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
=head1 NAME |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
Orze::Drivers::Section - Creates a subsection |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
=head1 DESCRIPTION |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
It creates an empty directory in the website tree. |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Regarding changing the output directory (or adding a relative path in |
19
|
|
|
|
|
|
|
the name), it is mainly useful if you want to create a menu of these |
20
|
|
|
|
|
|
|
subsections. |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
=head1 EXAMPLE |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
Photos |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
The two commented parts will be but in C<2008/> and C<2007/> directories. |
37
|
|
|
|
|
|
|
The C variable will contain the following tree: |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
| 2008 |
40
|
|
|
|
|
|
|
| |--> Event 1 |
41
|
|
|
|
|
|
|
| |--> Event 2 |
42
|
|
|
|
|
|
|
| |
43
|
|
|
|
|
|
|
| 2007 |
44
|
|
|
|
|
|
|
| |--> Event 1 |
45
|
|
|
|
|
|
|
| |--> Event 2 |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 METHODS |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
=head2 process |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
Do the real processing |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
=cut |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub process { |
56
|
0
|
|
|
0
|
1
|
|
my ($self) = @_; |
57
|
|
|
|
|
|
|
|
58
|
0
|
|
|
|
|
|
my $page = $self->{page}; |
59
|
0
|
|
|
|
|
|
my $name = $page->att('name'); |
60
|
|
|
|
|
|
|
|
61
|
0
|
|
|
|
|
|
mkpath($self->output($name)); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
1; |