The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
=head1 NAME

OODoc::Manifest - maintain the information inside a manifest file.

=head1 INHERITANCE

 OODoc::Manifest
   is a OODoc::Object

=head1 SYNOPSIS

 my $manifest = OODoc::Manifest->new(filename => ...);

=head1 OVERLOADED

=over 4

=item overload: B<@{}>()

Referencing this object as array will produce all filenames from the
manifest.

=back

=head1 METHODS

=head2 Constructors

=over 4

=item OODoc::Manifest-E<gt>B<new>(OPTIONS)

 -Option  --Default
  filename  undef

=over 2

=item filename => FILENAME

The filename where the manifest is in.  When the name is not defined,
the data will not be written.

=back

=back

=head2 Inheritance knowledge

=over 4

=item $obj-E<gt>B<extends>([OBJECT])

See L<OODoc::Object/"Inheritance knowledge">

=back

=head2 Attributes

=over 4

=item $obj-E<gt>B<filename>()

The name of the file which is read or will be written.

=back

=head2 The manifest list

=over 4

=item $obj-E<gt>B<add>(FILENAMES)

Adds the FILENAMES to the manifest, doubles are ignored.

=item $obj-E<gt>B<files>()

Returns an unsorted list with all filenames in this manifest.

=back

=head2 Internals

=over 4

=item $obj-E<gt>B<modified>([BOOLEAN])

Whether filenames have been added to the list after initiation.

=item $obj-E<gt>B<read>()

Read the MANIFEST file.  The comments are stripped from the lines.

=item $obj-E<gt>B<relative>(FILENAME)

Returns the name of the file relative to the location of the MANIFEST
file.  The MANIFEST file should always be in top of the directory tree,
so the FILENAME should be in the same directory and below.

=item $obj-E<gt>B<write>()

Write the MANIFEST file if it has changed.  The file will automatically
be written when the object leaves scope.

=back

=head2 Commonly used functions

=over 4

=item $obj-E<gt>B<filenameToPackage>(FILENAME)

=item OODoc::Manifest-E<gt>B<filenameToPackage>(FILENAME)

See L<OODoc::Object/"Commonly used functions">

=item $obj-E<gt>B<mkdirhier>(DIRECTORY)

=item OODoc::Manifest-E<gt>B<mkdirhier>(DIRECTORY)

See L<OODoc::Object/"Commonly used functions">

=back

=head2 Manual Repository

=over 4

=item $obj-E<gt>B<addManual>(MANUAL)

See L<OODoc::Object/"Manual Repository">

=item $obj-E<gt>B<mainManual>(NAME)

See L<OODoc::Object/"Manual Repository">

=item $obj-E<gt>B<manual>(NAME)

See L<OODoc::Object/"Manual Repository">

=item $obj-E<gt>B<manuals>()

See L<OODoc::Object/"Manual Repository">

=item $obj-E<gt>B<manualsForPackage>(NAME)

See L<OODoc::Object/"Manual Repository">

=item $obj-E<gt>B<packageNames>()

See L<OODoc::Object/"Manual Repository">

=back

=head1 DIAGNOSTICS

=over 4

=item Error: Cannot read manifest file $filename: $!

The manifest file could not be opened for reading.

=item Warning: MANIFEST file $name lists filename outside (sub)directory: $file

The MANIFEST file of a distributed package should be located in the top
directory of that packages.  All files of the distribution are in that
same directory, or one of its sub-directories, otherwise they will not
be packaged.

=item Error: manual definition requires manual object

A call to L<addManual()|OODoc::Object/"Manual Repository"> expects a new manual object (a L<OODoc::Manual|OODoc::Manual>),
however an incompatible thing was passed.  Usually, intended was a call
to L<manualsForPackage()|OODoc::Object/"Manual Repository"> or L<mainManual()|OODoc::Object/"Manual Repository">.

=back

=head1 SEE ALSO

This module is part of OODoc distribution version 2.00,
built on January 11, 2013. Website: F<http://perl.overmeer.net/oodoc/>

=head1 LICENSE

Copyrights 2003-2013 by [Mark Overmeer]. For other contributors see ChangeLog.

This program is free software; you can redistribute it and/or modify it
under the same terms as Perl itself.
See F<http://www.perl.com/perl/misc/Artistic.html>