summaryrefslogtreecommitdiff
path: root/lib/Bookmarks/C/Main.pm
blob: 7182a9e21fd0110da2f98973e1f728a36ebe2daf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package Bookmarks::C::Main; 
 
use strict;
use base 'Catalyst::Base';
 
=head1 NAME
 
Bookmarks::C::Main - Catalyst component
 
=head1 SYNOPSIS
 
See L<Bookmarks>
 
=head1 DESCRIPTION
 
Catalyst component.
 
=head1 METHODS
 
=over 4
 
=item default
 
=cut
 
sub default : Private {
    my ( $self$c ) = @_;
    $c->res->redirect($c->req->base,'/tags');
}
 
sub tags : Global {
    my ( $self$c ) = @_;
    $c->stash->{template}='tags';
    $c->stash->{tags}=[Bookmarks::M::DB::Tags->get_all_tags_by_popularity()];
}
 
=back
 
 
=head1 AUTHOR
 
A clever guy
 
=head1 LICENSE
 
This library is free software . You can redistribute it and/or modify
it under the same terms as perl itself.
 
=cut
 
1;