Changeset 102 for server/trunk/web/lib/Sophie/Model
- Timestamp:
- 12/09/10 07:01:43 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
server/trunk/web/lib/Sophie/Model/Help/POD.pm
r62 r102 5 5 use Pod::POM; 6 6 use Pod::POM::View::HTML; 7 use Pod::POM::View::Text; 7 8 8 9 extends 'Catalyst::Model'; … … 31 32 return values %{ $self->{pom} } 32 33 } 34 35 sub bot_functions { 36 my ($self) = @_; 37 my $botpom = $self->{pom}{'Chat::Cmd'}; 38 foreach my $head1 ($botpom->content) { 39 $head1->title eq 'AVAILLABLE FUNCTIONS' or next; 40 return map { $_->title } $head1->content; 41 } 42 } 43 44 sub bot_help_text { 45 my ($self, $cmd) = @_; 46 my $botpom = $self->{pom}{'Chat::Cmd'}; 47 foreach my $head1 ($botpom->content) { 48 $head1->title eq 'AVAILLABLE FUNCTIONS' or next; 49 foreach ($head1->content) { 50 $_->title =~ /^\Q$cmd\E( |$)/ or next; 51 my $ppvt = Pod::POM::View::Text->new; 52 return $_->present($ppvt); 53 } 54 last; 55 } 56 return; 57 } 58 33 59 34 60 sub xmlrpc_functions {
Note: See TracChangeset
for help on using the changeset viewer.