Data-Presenter

 view release on metacpan or  search on metacpan

lib/Data/Presenter.pm  view on Meta::CPAN


=back

then the data structure is suitable for manipulation by Data::Presenter.
In Perl terms, if the data can be represented by a I<hash of arrays>, it is
suitable for reformatting with Data::Presenter.

Data::Presenter can be used to output some fields (columns) from a database
while excluding others (see L<"sort_by_column()"> below).  It can also be used
to select certain entries (rows) from the database for output while excluding
other entries (see L<"select_rows()"> below).

In addition, if a user has two or more database reports, each of which has
the same field serving as an index for the data, then it is possible to
construct either a:

=over 4

=item *

L<Data::Presenter::Combo::Intersect|"Data::Presenter::Combo Objects"> object
which holds data for those entries found in common in all the source
databases (the I<intersection> of the entries in the source databases); or a

=item *

L<Data::Presenter::Combo::Union|"Data::Presenter::Combo Objects"> object
which holds data for those entries found in any of the source databases (the
I<union> of the entries in the source databases).

=back

Whichever flavor of Data::Presenter::Combo object the user creates, the
module guarantees that each field (column) found in any of the source
databases appears once and once only in the Combo object.

Data::Presenter is I<not> a database module I<per se>, nor is it an interface
to databases in the manner of DBI.  It cannot used to enter data into a
database, nor can it be used to modify or delete data.  Data::Presenter
operates on I<reports> generated from databases and is designed for the user
who:

=over 4

=item *

may not have direct access to a given database;

=item *

receives reports from that database generated by another user; but

=item *

needs to manipulate and re-output that data in simple, useful ways such as
text files, Perl formats and HTML tables.

=back

Data::Presenter is most appropriate in situations where the user either has
no access to (or chooses not to use) commercial desktop database programs such
as I<Microsoft Access>(r) or open source database programs such as I<MySQL>(r).
Data::Presenter's installation and preparation require moderate knowledge of
Perl, but the actual running of Data::Presenter scripts can be delegated to
someone with less knowledge of Perl.

=head1 DEFINITIONS AND EXAMPLES

=head2 Definitions

=head3 Administrator

The individual in a workplace responsible for the
installation of Data::Presenter on the system or network, analysis of
sources, preparation of Data::Presenter configuration files and preparation
of Data::Presenter subclass packages other than Data::Presenter::Combo and
its subclasses.  (I<Cf.> L<"Operator">.)

=head3 Entry

A row in the L<source|"Source"> containing the values of the
fields for one particular item.

=head3 Field

A column in the L<source|"Source"> containing a value for each
entry.

=head3 Index

The column in the L<source|"Source"> whose values uniquely
identify each entry in the source.  Also referred to as ''unique ID.''    (In
the current implementation of Data::Presenter, an index must be a strictly
numerical value.)

=head3 Index Field

The column in the L<source|"Source"> containing a unique
value (L<"index">) for each entry.

=head3 Metadata

Entries in the Data::Presenter object's data structure which
hold information prepared by the administrator about the data structure and
output parameters.

In the current version of Data::Presenter, metadata is extracted from the
variables C<@fields>, C<%parameters> and C<$index> found in the configuration
file F<fields.XXX.data>.  The metadata is first stored in package variables in
the invoking Data::Presenter subclass package and then entered into the
Data::Presenter object as hash entries keyed by C<'fields'>, C<'parameters'>
and C<$index>, respectively.  (The word 'options' has also been reserved for
future use as the key of a metadata entry in the object's data structure.)

=head3 Object's Current Data Structure

Non-L<metadata|"Metadata"> entries found
in the Data::Presenter object at the point a particular selection, sorting or
output method is called.

The object's current data structure may be thought of as the result of the



( run in 0.575 second using v1.01-cache-2.11-cpan-e1769b4cff6 )