API - Application Program Interface. A general term meaning the way that a program uses a functional library. Usually that is through function/subroutine calls.
A Perl API is just an API available for Perl programs to use.
The Perl API is the API available for other programs to call and invoke Perl. In this case it means a low-level interface generally called from C.
A Class is a description of a type. It can include an API, in that a program can invoke operations on members of the class (methods on objects), but a Class is much more than just an API. It includes the description of the data. For example, a Class of Car will describe the operations you can do on a car (start the engine, operate the brake, etc.) but also its identity (chassic number, registration number), it's colour, and so on. It may also own objects of other classes: 4 wheels, an engine, gearbox, and so on.
Simplistically, in classic Perl terms, a Class consists of subroutines (the API) and attributes (data).
Moose extends this to include other concepts such as roles and delegation.
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.