line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Catalyst::View::REST::XML; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
845
|
use strict; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
39
|
|
4
|
1
|
|
|
1
|
|
6
|
use base 'Catalyst::View'; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
614
|
|
5
|
1
|
|
|
1
|
|
517
|
use XML::Simple; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 NAME |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
Catalyst::View::REST::XML - (DEPRECATED) XML View Class |
12
|
|
|
|
|
|
|
|
13
|
|
|
|
|
|
|
=head1 SYNOPSIS |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# lib/MyApp/View/REST.pm |
16
|
|
|
|
|
|
|
package MyApp::View::REST; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
use base 'Catalyst::View::REST::XML'; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
1; |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
$c->forward('MyApp::View::REST'); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DEPRECATION NOTICE |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
This module has been deprecated in favor of L<Catalyst::Action::REST>. |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
This is the C<XML::Simple> view class. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head2 OVERLOADED METHODS |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head3 process |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Serializes $c->stash to $c->response->output. |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=cut |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
sub process { |
41
|
|
|
|
|
|
|
my ( $self, $c ) = @_; |
42
|
|
|
|
|
|
|
$c->response->headers->content_type('text/xml'); |
43
|
|
|
|
|
|
|
$c->response->output( XMLout $c->stash, RootName => 'response' ); |
44
|
|
|
|
|
|
|
return 1; |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 SEE ALSO |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
L<Catalyst>. |
50
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
=head1 AUTHOR |
52
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
Sebastian Riedel, C<sri@cpan.org> |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
=head1 COPYRIGHT |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
This program is free software, you can redistribute it and/or modify it under |
58
|
|
|
|
|
|
|
the same terms as Perl itself. |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
=cut |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
1; |