| Catalyst-Plugin-XMLRPC documentation | Contained in the Catalyst-Plugin-XMLRPC distribution. |
Catalyst::Plugin::XMLRPC::DispatchType::XMLRPC - XMLRPC DispatchType
Debug output for XMLRPC dispatch points
Do nothing
Call register_path for every path attribute in the given $action.
Sebastian Riedel, sri@cpan.org
This program is free software, you can redistribute it and/or modify it under the same terms as Perl itself.
| Catalyst-Plugin-XMLRPC documentation | Contained in the Catalyst-Plugin-XMLRPC distribution. |
package Catalyst::Plugin::XMLRPC::DispatchType::XMLRPC; use strict; use base qw/Catalyst::DispatchType/; use Text::SimpleTable;
sub list { my ( $self, $c ) = @_; my $methods = Text::SimpleTable->new( [ 35, 'Method' ], [ 36, 'Private' ] ); for my $method ( sort keys %{ $self->{methods} } ) { my $action = $self->{methods}->{$method}; $methods->row( "$method", "/$action" ); } $c->log->debug( "Loaded XMLRPC Methods:\n" . $methods->draw ) if ( keys %{ $self->{methods} } ); }
sub match { return 0 }
sub register { my ( $self, $c, $action ) = @_; my @register = @{ $action->attributes->{XMLRPC} || [] }; for my $method (@register) { $method ||= "$action"; $method =~ s#/#.#g; $self->{methods}{$method} = $action; } return 1 if @register; return 0; }
1;