1
=begin
2
3
=head1 Internal Design
4
5
Plumage is designed as a set of layered libraries providing the bulk of
6
its functionality underneath a thin, replaceable user interface layer.
7
At this time, Plumage ships with only one default interface, the F<plumage>
8
command line tool.
9
10
The Plumage stack currently looks like this:
11
12
    ,---------------------------------------------------.
13
    |                User Interface                     |
14
    |  ,------------------.  ,-----------------------.  |
15
    |  | Plumage::Project |  | Plumage::Dependencies |  |
16
    |  |  ,---------------+--+--------------------.  |  |
17
    |  |  |         Plumage::Metadata             |  |  |
18
    +--+--+---------------------------------------+--+--+
19
    |               Plumage::NQPUtil                    |
20
    +---------------------------------------------------+
21
    |   Parrot Libraries    | Parrot Languages          |
22
    |                       |                           |
23
    |   * dumper            | * NQP-rx                  |
24
    |   * P6object          | * PIR                     |
25
    |   * Getopt::Obj       | * data_json               |
26
    |   * Config::JSON      |                           |
27
    `---------------------------------------------------'
28
29
It is intended that as Plumage's functionality grows, more libraries (and
30
probably more layers) will be added in the C<Plumage::*> namespace.  There
31
has also been some discussion of merging C<Plumage::NQPUtil> or its
32
functional equivalent into Kakapo, the standard library project for NQP-rx.
33
34
35
=head1 Component Overviews
36
37
The following sections give a mild overview of each major component, from the
38
C<Plumage::NQPUtil> layer on up.  There are some additional details for
39
particular pieces available in other documents; these are noted below.  For
40
even more detail, read the source or visit C<#parrot> on C<irc.parrot.org>,
41
and we'll be happy to help you.
42
43
44
=head2 Plumage::NQPUtil
45
46
This component provides a very simple library of common functions to all of
47
the layers above it.  These range from functional constructs like C<grep>,
48
C<map>, and C<reduce>, to portable system utilities like C<find_program>,
49
C<mkpath>, and C<qx>, to generally useful tools like C<eval>, C<slurp>, and
50
C<subst>.
51
52
In addition, C<Plumage::NQPUtil> provides the magic that sets up the
53
"interpreter globals", such as C<$*PROGRAM_NAME>, C<@*ARGS>, and C<%*VM>.
54
55
56
=head2 Plumage::Metadata
57
58
All of the logic to load, parse, and validate Plumage metadata is concentrated
59
in this module; it is also responsible for performing searches and queries on
60
the metadata collection.
61
62
63
=head2 Plumage::Project
64
65
This module collects the important information about a project in one place
66
-- metadata, project directory, and so on.  It also contains the logic for
67
performing actions on a project, such as fetching the source, building
68
binaries, and running tests.
69
70
Adding a new action to the available project actions is described in the
71
L<Adding a New Project Action|add-action.pod> document.
72
73
74
=head2 Plumage::Dependencies
75
76
Plumage projects can have many interlocking dependencies, both to other Plumage
77
projects and to external items such as system binaries and standard build
78
tools.  This module contains the dependency solver that makes sense of the web
79
of dependencies and determines what must be done to resolve all unmet
80
dependencies.
81
82
83
=head2 User Interface
84
85
The user interface is intended to be as thin as possible, merely containing the
86
necessary logic to perform directly user-facing functions such as parsing the
87
user's input, showing feedback, displaying query results, and giving help.
88
89
Adding a new command to the F<plumage> command line tool is described in the
90
L<Adding a New Command|add-command.pod> document.
91
92
=end