UNIVERSAL::moniker(3pm)

UNIVERSAL::moniker3pm

Nicer names for your perl modules/classes

Usage

  use UNIVERSAL::moniker;

Overview

Class names in Perl often don't sound great when spoken, or look good when written in prose. For this reason, we tend to say things like "customer" or "basket" when we are referring to "My::Site::User::Customer" or "My::Site::Shop::Basket". We thought it would be nice if our classes knew what we would prefer to call them.

This module will add a "moniker" (and "plural_moniker") method to "UNIVERSAL", and so to every class or module.

moniker

  $ob->moniker;

Returns the moniker for $ob. So, if $ob->isa("Big::Scary::Animal"), "moniker" will return "animal".

plural_moniker

  $ob->plural_moniker;

Returns the plural moniker for $ob. So, if $ob->isa("Cephalopod::Octopus"), "plural_moniker" will return "octopuses".

(You need to install Lingua::EN::Inflect for this to work.)

Releases

11 releases since Debian 3.1 (Sarge); the text changed 7 times.

  1. 3.1
  2. 4.0
  3. 5.0
  4. 6.0–7
  5. 8–9
  6. 10
  7. 11
  8. 12–13

Authors

Marty Pauley <[email protected]>, Tony Bowden <[email protected]>, Elizabeth Mattijsen <[email protected]>

(Yes, 3 authors for such a small module!)

From libuniversal-moniker-perl 0.08-10 in Debian 13 (Trixie). Parsed by carta from the page's man source.