« blib/lib/OpusVL/AppKit/LDAPAuth.pm
↑ Summary
blib/lib/OpusVL/AppKit/FormFu/Constraint/AppKitUsername.pm »
| 1 | package OpusVL::AppKit::View::SimpleXML; | ||||||||||||
| 2 | |||||||||||||
| 3 | |||||||||||||
| 4 | |||||||||||||
| 5 | 10 | ▶ | use Moose; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 6 | |||||||||||||
| 7 | 10 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 8 | BEGIN | ||||||||||||
| 9 | { | ||||||||||||
| 10 | 10 | ▶ | extends 'Catalyst::View'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | } | ||||||||||||
| 12 | 10 | ▶ | use XML::Simple; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 13 | |||||||||||||
| 14 | sub process | ||||||||||||
| 15 | { | ||||||||||||
| 16 | 0 | ▶ | my ( $self, $c ) = @_; | ||||||||||
|
Subroutine
process: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||
| 17 | 0 | ▶ | $c->response->headers->content_type($c->stash->{content_type} || 'text/xml'); | ||||||||||
|
Condition0%0/2
$c->stash->{'content_type'} || 'text/xml'
MC/DC0%0/1
$c->stash->{'content_type'} || 'text/xml'
$c->stash->{'content_type'}
Truth table0%0/2
A
A= $c->stash->{'content_type'}
| |||||||||||||
| 18 | # FIXME: really ought to make the XML options optional too. | ||||||||||||
| 19 | $c->response->output( XMLout $c->stash->{xml}, | ||||||||||||
| 20 | NoAttr => 1, | ||||||||||||
| 21 | 0 | ▶ | RootName => $c->stash->{root_element} || 'root_element', | ||||||||||
|
Condition0%0/2
$c->stash->{'root_element'} || 'root_element'
MC/DC0%0/1
$c->stash->{'root_element'} || 'root_element'
$c->stash->{'root_element'}
Truth table0%0/2
A
A= $c->stash->{'root_element'}
| |||||||||||||
| 22 | XMLDecl => 1 ); | ||||||||||||
| 23 | 0 | return 1; | |||||||||||
| 24 | } | ||||||||||||
| 25 | |||||||||||||
| 26 | |||||||||||||
| 27 | 10 | 1; | |||||||||||
| 28 | |||||||||||||
| 29 | __END__ | ||||||||||||
| 30 | |||||||||||||
| 31 | =pod | ||||||||||||
| 32 | |||||||||||||
| 33 | =encoding UTF-8 | ||||||||||||
| 34 | |||||||||||||
| 35 | =head1 NAME | ||||||||||||
| 36 | |||||||||||||
| 37 | OpusVL::AppKit::View::SimpleXML | ||||||||||||
| 38 | |||||||||||||
| 39 | =head1 VERSION | ||||||||||||
| 40 | |||||||||||||
| 41 | version 2.24 | ||||||||||||
| 42 | |||||||||||||
| 43 | =head1 DESCRIPTION | ||||||||||||
| 44 | |||||||||||||
| 45 | XML view using XML::Simple based on Catalyst::View::REST::XML | ||||||||||||
| 46 | Place an xml payload in $c->stash->{xml}. | ||||||||||||
| 47 | The content type will be set to 'text/xml' or $c->stash->{content_type} | ||||||||||||
| 48 | $c->stash->{root_element} should contain the name of the root element | ||||||||||||
| 49 | for the XML. | ||||||||||||
| 50 | |||||||||||||
| 51 | The XMLout call is made with the NoAttr => 1 and XMLDecl => 1 settings. | ||||||||||||
| 52 | |||||||||||||
| 53 | Included is the 'AppKit' ShareDir path to include distributed files. | ||||||||||||
| 54 | |||||||||||||
| 55 | =head1 NAME | ||||||||||||
| 56 | |||||||||||||
| 57 | OpusVL::AppKit::View::SimpleXML - Simple XML view for OpusVL::AppKit | ||||||||||||
| 58 | |||||||||||||
| 59 | =head1 SEE ALSO | ||||||||||||
| 60 | |||||||||||||
| 61 | L<OpusVL::AppKit> | ||||||||||||
| 62 | |||||||||||||
| 63 | =head1 AUTHOR | ||||||||||||
| 64 | |||||||||||||
| 65 | OpusVL - www.opusvl.com | ||||||||||||
| 66 | |||||||||||||
| 67 | =head1 COPYRIGHT AND LICENSE | ||||||||||||
| 68 | |||||||||||||
| 69 | This software is copyright (c) 2010 by OpusVL - www.opusvl.com. | ||||||||||||
| 70 | |||||||||||||
| 71 | This is free software; you can redistribute it and/or modify it under | ||||||||||||
| 72 | the same terms as the Perl 5 programming language system itself. | ||||||||||||
| 73 | |||||||||||||
| 74 | =cut | ||||||||||||