lib/Data/XML/Variant/Output.pm

filter: Statementstmt 100% 13 / 13 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 5 / 5 Podpod 100% 2 / 2 totaltotal 100% 20 / 20 CC 1 SCAR 0.0
CC
1
Cov
100%
BEGIN
1.0
BEGIN
1.0
__ANON__
1.0
CRAP 1.0
« blib/lib/Data/XML/Variant.pm ↑ Summary
1 package Data::XML::Variant::Output;
2  
3 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 use overload
5 2 ▶ '""' => sub { shift->output },
Subroutine BEGIN: called CC=1 SCAR=0.0
Subroutine __ANON__: called CC=1 SCAR=0.0
6 2 fallback => 1;
7  
8  
9 =head1 NAME
10  
11 Data::XML::Variant::Output - Output class for Data::XML::Variant
12  
13 =head1 VERSION
14  
15 Version 0.01
16  
17 =cut
18  
19 2 our $VERSION = '0.01';
20  
21 =head1 SYNOPSIS
22  
23 Do not use this class directly. This class is merely a convenient way of
24 "tagging" data as already having been processed (for example, escapes already
25 applied).
26  
27 =head1 EXPORT
28  
29 None.
30  
31 =head1 METHODS
32  
33 =head2 new
34  
35 my $output = Data::XML::Variant::Output->new($string);
36  
37 Passed a string, the constructor will return an object with overloaded
38 stringification. When printed, it will print the string it contains.
39  
40 =cut
41  
42 1 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod documented
43 1 my ( $class, $string ) = @_;
44 1 bless \$string, $class;
45 }
46  
47 ##############################################################################
48  
49 =head2 output
50  
51 print $output->output;
52  
53 Returns the C<$string> passed to C<new>.
54  
55 =cut
56  
57 3 ▶sub output { ${$_[0]} }
Subroutine output: called CC=1 SCAR=0.0
Pod documented
58  
59 =head1 AUTHOR
60  
61 Curtis "Ovid" Poe, C<< <ovid@cpan.org> >>
62  
63 =head1 BUGS
64  
65 Please report any bugs or feature requests to
66 C<bug-data-xml-variant@rt.cpan.org>, or through the web interface at
67 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-XML-Variant>.
68 I will be notified, and then you'll automatically be notified of progress on
69 your bug as I make changes.
70  
71 =head1 ACKNOWLEDGEMENTS
72  
73 =head1 COPYRIGHT & LICENSE
74  
75 Copyright 2005 Curtis "Ovid" Poe, all rights reserved.
76  
77 This program is free software; you can redistribute it and/or modify it
78 under the same terms as Perl itself.
79  
80 =cut
81  
82 2 1;
« blib/lib/Data/XML/Variant.pm ↑ Summary