1moniker(3)            User Contributed Perl Documentation           moniker(3)
2
3
4

NAME

6       UNIVERSAL::moniker
7

SYNOPSIS

9         use UNIVERSAL::moniker;
10

DESCRIPTION

12       Class names in Perl often don't sound great when spoken, or look good
13       when written in prose.  For this reason, we tend to say things like
14       "customer" or "basket" when we are referring to "My::Site::User::Cus‐
15       tomer" or "My::Site::Shop::Basket".  We thought it would be nice if our
16       classes knew what we would prefer to call them.
17
18       This module will add a "moniker" (and "plural_moniker") method to "UNI‐
19       VERSAL", and so to every class or module.
20
21       moniker
22
23         $ob->moniker;
24
25       Returns the moniker for $ob.  So, if $ob->isa("Big::Scary::Animal"),
26       "moniker" will return "animal".
27
28       plural_moniker
29
30         $ob->plural_moniker;
31
32       Returns the plural moniker for $ob.  So, if $ob->isa("Cephalopod::Octo‐
33       pus"), "plural_moniker" will return "octopuses".
34
35       (You need to install Lingua::EN::Inflect for this to work.)
36

AUTHORS

38       Marty Pauley <marty+perl@kasei.com>, Tony Bowden <tony@kasei.com>,
39       Elizabeth Mattijsen <liz@dijkmat.nl>
40
41       (Yes, 3 authors for such a small module!)
42
44         Copyright (C) 2004 Kasei
45
46         This program is free software; you can redistribute it under the same terms as
47         Perl.
48
49         This program is distributed in the hope that it will be useful, but WITHOUT
50         ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
51         FOR A PARTICULAR PURPOSE.
52
53
54
55perl v5.8.8                       2004-07-21                        moniker(3)
Impressum