NAME
Acme::MetaSyntactic - Themed metasyntactic variables
SYNOPSIS
use Acme::MetaSyntactic;
my $meta = Acme::MetaSyntactic->new( 'shadok' );
print $meta->name; # return a single name
my @names = $meta->name( 4 ); # return 4 distinct names (if possible)
# you can temporarily switch theme (NOT RECOMMENDED)
my $foo = $meta->foo; # return 1 name from theme foo
my @foo = $meta->foo(2); # return 2 names from theme foo
# but why would you need an instance variable?
use Acme::MetaSyntactic 'batman';
print metaname;
my @names = metaname( 4 );
# the convenience functions are still here:
print join $/, metabatman( 5 );
# but a one-liner is even better
perl -MAcme::MetaSyntactic=batman -le 'print metaname'
DESCRIPTION
When writing code examples, it's always easy at the beginning:
my $foo = "bar";
$foo .= "baz"; # barbaz
But one gets quickly stuck with the same old boring examples. Does it have to be this way? I say "No".
Here is Acme::MetaSyntactic, designed to fulfill your metasyntactic needs. Never again will you scratch your head in search of a good variable name!
METHODS & FUNCTIONS
Acme::MetaSyntactic has an object-oriented interface, as well as a functionnal one.
Methods
If you choose to use the OO interface, the following methods are available:
- new( $theme )
-
Create a new instance of Acme::MetaSyntactic with the theme
$theme
. If$theme
is omitted, the default theme isfoo
. - name( $count )
-
Return
$count
items from the theme given in the constructor.There is also one class method:
Convenience methods also exists for all the themes. The methods are named after the theme.
Functions
The functional interface provides the following functions:
- metaname( $count )
-
See
name()
. The default is the same as for the OO interface. - metabatman
- metadilbert
- metadonmartin
- metaflintstones
- metafoo
- metapynchon
- metarobin
- metashadok
- metatoto
-
The convenience functions are exported as expected.
If new themes are added with the
add_theme()
class method, the convenience functions will be created (and exported) as well.
THEMES
The following themes are available in this version:
- batman
-
The fight sound effects from the 60s serial.
- dilbert
-
Characters from the Dilbert daily strip.
- donmartin
-
The sound effects from Don Martin's comics.
- flintstones
-
The characters from the popular serial.
- foo
-
The classic. This is the default theme.
- pynchon
-
Character names from Thomas Pynchon's books.
- robin
-
Robin's exclamations, from the Batman 60's serial (it's a great source of metasyntac^Wsilly stuff).
- shadok
-
The whole shadok vocabulary. 4 words.
- toto
-
The French metasyntactic names.
AUTHOR
Philippe 'BooK' Bruhat, <book@cpan.org>
BUGS
Please report any bugs or feature requests to bug-acme-metasyntactic@rt.cpan.org
, or through the web interface at http://rt.cpan.org. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
If you think this modules lacks a particular set of metasyntactic variables, please send me a list, as well as a generation algorithm (either one of the built-ins any, list, combine, or a new one from your invention)
ACKNOWLEDGEMENTS
This module could not have been possible without:
- Some sillyness
-
See http://use.perl.org/~BooK/journal/22301, and the follow-up http://use.perl.org/~BooK/journal/22710.
- The Batman serial from the 60s (it was shown in France in the 80s).
-
All the bat sounds come from this page: http://www.usfamily.net/web/wpattinson/otr/batman/batfight.htm
The list of Robin's exclamations comes from this page: http://members.tripod.com/~AdamWest/robin.htm
Robin's exclamations are also recorded here, with additional details: http://www.usfamily.net/web/wpattinson/otr/batman/batholy.htm
- RFC 3092 - Etymology of "Foo"
- Rafael Garcia-Suarez,
-
who apparently plans to use it. Especially now that it's usable in one-liners.
- Vahe Sarkissian,
-
who suggested the sound effects from Don Martin's comic-books, and provided a link to a comprehensive list:
http://www.collectmad.com/madcoversite/dmd-alphabetical.html
- Sébastien Aperghis-Tramoni,
-
who compiled a short list of Dilbert-related names.
- David Landgren,
-
who not only named all the machines in the
mongueurs.net
(stencil
,sferics
andprofane
) after characters from Thomas Pynchon's books, but also provided a first list.The
pynchon
list will probably grow in future versions, as he goes through his books.
COPYRIGHT & LICENSE
Copyright 2005 Philippe 'BooK' Bruhat, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 315:
Non-ASCII character seen before =encoding in 'Sébastien'. Assuming CP1252