Acme::Hoge - Replace "foo" in output with "hoge".


Acme-Hoge documentation Contained in the Acme-Hoge distribution.

Index


Code Index:

NAME

Top

Acme::Hoge - Replace "foo" in output with "hoge".

VERSION

Top

Version 0.03

SYNOPSIS

Top

    use Acme::Hoge;

    print "foo bar baz foobar\n";
    # hoge fuga piyo hogefuga

    print "sidebar\n";
    # sidebar
    # (not be rewritten)

DESCRIPTION

Top

Acme::Hoge replaces some words in output.

If you output "foo", it will be rewritten as "hoge".

And "bar" will be "fuga", "baz" will be "piyo" and so on.

FUNCTIONS

Top

There is no function.

AUTHOR

Top

Hogeist, <mahito at cpan.org>, http://www.ornithopter.jp/

BUGS

Top

Please report any bugs or feature requests to bug-acme-hoge at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Acme-Hoge. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Acme::Hoge

You can also look for information at:

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Acme-Hoge

* CPAN Ratings

http://cpanratings.perl.org/d/Acme-Hoge

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Acme-Hoge

* Search CPAN

http://search.cpan.org/dist/Acme-Hoge

ACKNOWLEDGEMENTS

Top

SEE ALSO

Top

Output::Rewrite

COPYRIGHT & LICENSE

Top


Acme-Hoge documentation Contained in the Acme-Hoge distribution.
package Acme::Hoge;

use warnings;
use strict;

use Output::Rewrite (
	rewrite_rule => {
		'(?<=\b)foo(?=\b)' => qq/hoge/,
		'(?<=\b)FOO(?=\b)' => qq/HOGE/,
		'(?<=\b)Foo(?=\b)' => qq/Hoge/,
		'(?<=\b)bar(?=\b)' => qq/fuga/,
		'(?<=\b)BAR(?=\b)' => qq/FUGA/,
		'(?<=\b)Bar(?=\b)' => qq/Fuga/,
		'(?<=\b)baz(?=\b)' => qq/piyo/,
		'(?<=\b)BAZ(?=\b)' => qq/PIYO/,
		'(?<=\b)Baz(?=\b)' => qq/Piyo/,
		'(?<=\b)foobar(?=\b)' => qq/hogefuga/,
		'(?<=\b)FOOBAR(?=\b)' => qq/HOGEFUGA/,
		'(?<=\b)FooBar(?=\b)' => qq/HogeFuga/,
		'(\d)' => '$1!',
	},
);

our $VERSION = '0.03';

1; # End of Acme::Hoge