Plugtools/Plugins/Dump.pm

filter: Statementstmt 47.8% 11 / 23 Branchbran 0.0% 0 / 4 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 75.0% 3 / 4 Podpod 100% 1 / 1 totaltotal 46.8% 15 / 32 CC 3 SCAR 18.7
CC
3
Cov
41%
plugin
12.0
BEGIN
1.0
BEGIN
1.0
CRAP 6.5
↑ Summary Plugtools.pm »
1 package Plugtools::Plugins::Dump;
2  
3 2 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 2 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
5 2 ▶use Data::Dumper;
Subroutine BEGIN: called CC=1 SCAR=0.0
6  
7 =head1 NAME
8  
9 Plugtools::Plugins::Dump - A Plugtools plugin that calls Data::Dumper->Dumper on %opts and %args that are passed to the plugin.
10  
11 =head1 VERSION
12  
13 Version 0.0.0
14  
15 =cut
16  
17 2 our $VERSION = '0.0.0';
18  
19 =head1 SYNOPSIS
20  
21 This is a Plugtools plugin that calls Data::Dumper->Dumper on %opts and %args
22 that are passed to the plugin.
23  
24 =cut
25  
26 =head1 Functions
27  
28 =head2 plugin
29  
30 The function that will be called by Plugtools.
31  
32 use Plugtools::Plugins::Dump;
33 %returned=Plugtools::Plugins::Dump->plugin(\%opts, \%args);
34
35 if($returned{error}){
36 print "Error!\n";
37 }
38  
39 =cut
40  
41 0 ▶sub plugin{
Subroutine plugin: not called CC=3 SCAR=24.8
Pod documented
42 0 my %opts;
43 0 ▶ if(defined($_[1])){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[1]) 0 0 0
44 0 %opts= %{$_[1]};
45 };
46 0 my %args;
47 0 ▶ if(defined($_[2])){
Branch: 1 branch
BranchTrueFalseTotal
if (defined $_[2]) 0 0 0
48 0 %args= %{$_[2]};
49 };
50  
51 0 print '%opts=...'."\n".Dumper(\%opts)."\n\n".'%args=...'."\n".Dumper(\%args);
52  
53 0 my %returned;
54 0 $returned{error}=undef;
55  
56 0 return %returned;
57 }
58  
59 =head1 ERROR CODES
60  
61 At this time this plugin does not return any error codes. As long as Data::Dumper is
62 installed, it will work.
63  
64 =head1 AUTHOR
65  
66 Zane C. Bowers, C<< <vvelox at vvelox.net> >>
67  
68 =head1 BUGS
69  
70 Please report any bugs or feature requests to C<bug-plugtools at rt.cpan.org>, or through
71 the web interface at L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Plugtools>. I will be notified, and then you'll
72 automatically be notified of progress on your bug as I make changes.
73  
74  
75  
76  
77 =head1 SUPPORT
78  
79 You can find documentation for this module with the perldoc command.
80  
81 perldoc Plugtools
82  
83  
84 You can also look for information at:
85  
86 =over 4
87  
88 =item * RT: CPAN's request tracker
89  
90 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Plugtools>
91  
92 =item * AnnoCPAN: Annotated CPAN documentation
93  
94 L<http://annocpan.org/dist/Plugtools>
95  
96 =item * CPAN Ratings
97  
98 L<http://cpanratings.perl.org/d/Plugtools>
99  
100 =item * Search CPAN
101  
102 L<http://search.cpan.org/dist/Plugtools/>
103  
104 =back
105  
106  
107 =head1 ACKNOWLEDGEMENTS
108  
109  
110 =head1 COPYRIGHT & LICENSE
111  
112 Copyright 2009 Zane C. Bowers, all rights reserved.
113  
114 This program is free software; you can redistribute it and/or modify it
115 under the same terms as Perl itself.
116  
117  
118 =cut
119  
120 2 1; # End of Plugtools
↑ Summary Plugtools.pm »