
=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 DESCRIPTION



=head1 OVERLOADED


overload: B<@{}>

=over 4

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

=back


=head1 METHODS


=head2 Constructors


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

=over 4

 Option    Defined in  Default
 filename              undef  

. filename FILENAME

=over 4

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

=back

=back

=head2 Inheritance knowledge


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

=over 4

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

=back

=head2 Attributes


$obj-E<gt>B<filename>

=over 4

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

=back

=head2 The manifest list


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

=over 4

Adds the FILENAMES to the manifest, doubles are ignored.

=back

$obj-E<gt>B<files>

=over 4

Returns an unsorted list with all filenames in this manifest.

=back

=head2 Internals


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

=over 4

Whether filenames have been added to the list after initiation.

=back

$obj-E<gt>B<read>

=over 4

Read the manifest file.

=back

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

=over 4

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.

=back

$obj-E<gt>B<write>

=over 4

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

=back

=head2 Commonly used functions


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

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

=over 4

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

=back

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

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

=over 4

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

=back

=head2 Manual Repository


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

=over 4

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

=back

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

=over 4

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

=back

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

=over 4

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

=back

$obj-E<gt>B<manuals>

=over 4

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

=back

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

=over 4

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

=back

$obj-E<gt>B<packageNames>

=over 4

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

=back



=head1 DIAGNOSTICS

I<Error:> Cannot read manifest file $filename: $!

The manifest file could not be opened for reading.

I<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.

I<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">.






=head1 REFERENCES

See the OODoc website at L<http://perl.overmeer.net/oodoc/> for more details.

=head1 COPYRIGHTS

Module version 0.09.
Written by Mark Overmeer (mark@overmeer.net).  See the ChangeLog for
other contributors.

Copyright (c) 2003 by the author(s). All rights reserved.  This program
is free software; you can redistribute it and/or modify it under the
same terms as Perl itself.


