line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package CogWiki; |
2
|
1
|
|
|
1
|
|
707
|
use 5.008003; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
36
|
|
3
|
1
|
|
|
1
|
|
834
|
use Mouse; |
|
1
|
|
|
|
|
39224
|
|
|
1
|
|
|
|
|
5
|
|
4
|
|
|
|
|
|
|
extends 'Cog::Plugin'; |
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub url_map { |
9
|
|
|
|
|
|
|
[ |
10
|
0
|
|
|
0
|
|
|
'()', |
11
|
|
|
|
|
|
|
['/' => 'redirect', ('/pages/')], |
12
|
|
|
|
|
|
|
['/home/?' => 'home_page'], |
13
|
|
|
|
|
|
|
['/pages/?' => 'page_list'], |
14
|
|
|
|
|
|
|
['/page/([A-Z0-9]{4})/?' => 'page_display', ('$1')], |
15
|
|
|
|
|
|
|
['/page/name/([^/]+)/?' => 'page_by_name', ('$1')], |
16
|
|
|
|
|
|
|
['/tags/' => 'tag_list' ], |
17
|
|
|
|
|
|
|
['/tag/([^/]+)/?' => 'tag_page_list', ('$1')], |
18
|
|
|
|
|
|
|
] |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
sub site_navigation { |
22
|
|
|
|
|
|
|
[ |
23
|
0
|
|
|
0
|
|
|
'()', |
24
|
|
|
|
|
|
|
['Home' => '/home/'], |
25
|
|
|
|
|
|
|
['Recent Changes' => '/pages/'], |
26
|
|
|
|
|
|
|
['Tags' => '/tags/'], |
27
|
|
|
|
|
|
|
] |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=encoding utf8 |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 NAME |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
CogWiki - Cog Based Wiki Framework |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 SYNOPSIS |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
> cog init CogWiki |
41
|
|
|
|
|
|
|
> cog make |
42
|
|
|
|
|
|
|
> cog start |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 AUTHOR |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Ingy döt Net |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
=head1 COPYRIGHT |
49
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
|
Copyright (c) 2010. Ingy döt Net. |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
This program is free software; you can redistribute it and/or modify it |
53
|
|
|
|
|
|
|
under the same terms as Perl itself. |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
See http://www.perl.com/perl/misc/Artistic.html |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=cut |