1package 2 MyApp::Subclass; 3 4 5use strict; 6use base qw(MyApp); 7 8 9sub sum : String(a,b) { 10 my $s = shift; 11 return ($_[0]->{a} + $_[0]->{b}) * 2; 12} 13 14 151; 16__END__ 17 18=pod 19 20=head1 NAME 21 22MyApp::Subclass - sample JSON-RPC server class 23 24 25=head1 DESCRIPTION 26 27This module is a smple code (for Perl 5.6 or later). 28Please check the source. 29 30It is a MyApp subclass, so methods are inherited. 31 32 33=head2 PROCEDURES 34 35=over 36 37 38=item sum 39 40Takes two numbers and returns the added and multiplied number. 41 42 43=cut 44 45=head1 AUTHOR 46 47Makamaka Hannyaharamitu, E<lt>makamaka[at]cpan.orgE<gt> 48 49 50=head1 COPYRIGHT AND LICENSE 51 52Copyright 2008 by Makamaka Hannyaharamitu 53 54This library is free software; you can redistribute it and/or modify 55it under the same terms as Perl itself. 56 57=cut 58 59 60