Acme-Thing

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    Acme::Thing - Represent anything as Perl (CPAN) module

SPECIFICATION VERSION
    0.1

VERSION
    This document describes version 0.1.0 of Acme::Thing (from Perl
    distribution Acme-Thing), released on 2023-03-19.

DESCRIPTION
    "Acme::Thing" is a convention for representing anything as a Perl
    module/distribution. Custom prerequisite phase/relationship in
    distribution metadata can be used to relate the thing to other things.
    The "get_thing_attrs" class method can be used to rerieve attributes of
    the thing. The module's POD can be used to document the thing.

  Naming convention
    The module should be named "Acme::Thing::$SUBNAMESPACE::$NAME" where
    $SUBNAMESPACE is one or more levels of subnamespaces and $NAME is the
    name/title of the thing. Both $SUBNAMESPACE and $TITLE should use
    "CamelCase" notation and should be in singular noun form whenever
    possible. Underscore is used to separate name parts. For example, for a
    TV series the $NAME could be the title of the series using the IMDB
    convention:

     Acme::Thing::TVSeries::BreakingBad_2008_2013
     Acme::Thing::TvSeries::CornerGas_2004_2009

    and for a book title the $NAME could be the title (without the subtitle)
    of the book, preferrably with the publication year. Subsequent editions
    of a book should be named using the "nE" notation. Examples:

     Acme::Thing::Book::ProgrammingPerl_1991
     Acme::Thing::Book::ProgrammingPerl_4E_2012

  Relationship with other things
    TBD.

  Attributes
    The module must provide a class method called "get_thing_attrs" (by
    itself or by inheritance, doesn't matter), which must return a DefHash
    containng attributes of the thing. The required attributes are:

    *   title

        Title of the thing, in a format common for that thing.

    For example, for a book title:

     {
       title => "Programming Perl",
       isbn => ...,
       year => 1991,
       summary => ...,
       description => ...,
       ...
     }

    For a TV series:

     {
       title => "Breaking Bad",
       year_first => 2008,
       year_last => 2013,
       imdb_title_id => ...,
       summary => ...,
       description => ...,
       ...
     }

  Why?
    Now comes the harder question: why use Perl module/distribution to
    represent seomthing at all, other than an actual Perl module? Releasing
    as Perl distribution and module leverages a few things: 1) the CPAN
    distribution metadata (see CPAN::Meta) where a distribution can depend
    (relate) to other modules (other things); 2) the CPAN infrastructure
    where revisions of the thing can be released, distributed, tested, and
    installed to target systems; 3) the OO feature of the Perl language
    where a user can interact with a thing (e.g. download a TV series poster
    or trailer, etc).

    Of course, none of the above suggest that a generic representation like
    "Acme::Thing" is better than a more specific one, e.g.
    "WebService::ISBNDB" for books.

HOMEPAGE
    Please visit the project's homepage at
    <https://metacpan.org/release/Acme-Thing>.

SOURCE



( run in 0.707 second using v1.01-cache-2.11-cpan-39bf76dae61 )