blib/lib/Acme/Hoge.pm

filter: Statementstmt 77.7% 7 / 9 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 100% 3 / 3 Podpod n/a totaltotal 83.3% 10 / 12 CC 1 SCAR 0.9
CC
1
Cov
78%
BEGIN
1.3
BEGIN
1.0
BEGIN
1.0
CRAP 1.1
↑ Summary
1 package Acme::Hoge;
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
6 2 ▶use Output::Rewrite (
Subroutine BEGIN: called CC=1 SCAR=2.6
7 0 rewrite_rule => {
8 '(?<=\b)foo(?=\b)' => qq/hoge/,
9 '(?<=\b)FOO(?=\b)' => qq/HOGE/,
10 '(?<=\b)Foo(?=\b)' => qq/Hoge/,
11 '(?<=\b)bar(?=\b)' => qq/fuga/,
12 '(?<=\b)BAR(?=\b)' => qq/FUGA/,
13 '(?<=\b)Bar(?=\b)' => qq/Fuga/,
14 '(?<=\b)baz(?=\b)' => qq/piyo/,
15 '(?<=\b)BAZ(?=\b)' => qq/PIYO/,
16 '(?<=\b)Baz(?=\b)' => qq/Piyo/,
17 '(?<=\b)foobar(?=\b)' => qq/hogefuga/,
18 '(?<=\b)FOOBAR(?=\b)' => qq/HOGEFUGA/,
19 '(?<=\b)FooBar(?=\b)' => qq/HogeFuga/,
20 '(\d)' => '$1!',
21 },
22 0 );
23
24 =head1 NAME
25
26 Acme::Hoge - Replace "foo" in output with "hoge".
27
28 =head1 VERSION
29
30 Version 0.03
31
32 =cut
33
34 our $VERSION = '0.03';
35
36 =head1 SYNOPSIS
37
38 use Acme::Hoge;
39
40 print "foo bar baz foobar\n";
41 # hoge fuga piyo hogefuga
42
43 print "sidebar\n";
44 # sidebar
45 # (not be rewritten)
46
47 =head1 DESCRIPTION
48
49 Acme::Hoge replaces some words in output.
50
51 If you output "foo", it will be rewritten as "hoge".
52
53 And "bar" will be "fuga", "baz" will be "piyo" and so on.
54
55 =head1 FUNCTIONS
56
57 There is no function.
58
59 =head1 AUTHOR
60
61 Hogeist, C<< <mahito at cpan.org> >>, L<http://www.ornithopter.jp/>
62
63 =head1 BUGS
64
65 Please report any bugs or feature requests to
66 C<bug-acme-hoge at rt.cpan.org>, or through the web interface at
67 L<http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-Hoge>.
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 SUPPORT
72
73 You can find documentation for this module with the perldoc command.
74
75 perldoc Acme::Hoge
76
77 You can also look for information at:
78
79 =over 4
80
81 =item * AnnoCPAN: Annotated CPAN documentation
82
83 L<http://annocpan.org/dist/Acme-Hoge>
84
85 =item * CPAN Ratings
86
87 L<http://cpanratings.perl.org/d/Acme-Hoge>
88
89 =item * RT: CPAN's request tracker
90
91 L<http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-Hoge>
92
93 =item * Search CPAN
94
95 L<http://search.cpan.org/dist/Acme-Hoge>
96
97 =back
98
99 =head1 ACKNOWLEDGEMENTS
100
101 =head1 SEE ALSO
102
103 Output::Rewrite
104
105 =head1 COPYRIGHT & LICENSE
106
107 Copyright 2006 Hogeist, all rights reserved.
108
109 This program is free software; you can redistribute it and/or modify it
110 under the same terms as Perl itself.
111
112 =cut
113
114 1; # End of Acme::Hoge
↑ Summary