NAME

Meta::Lang::Perl::Perlpkg - store information for a perl package.

COPYRIGHT

Copyright (C) 2001, 2002 Mark Veltzer; All rights reserved.

LICENSE

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.

DETAILS

MANIFEST: Perlpkg.pm
PROJECT: meta
VERSION: 0.19

SYNOPSIS

package foo;
use Meta::Lang::Perl::Perlpkg qw();
my($object)=Meta::Lang::Perl::Perlpkg->new();
my($result)=$object->method();

DESCRIPTION

This module stores information needed to create a single perl package. Supplies such services as creating a perl package and other services.

FUNCTIONS

BEGIN()
init($)
add_deps($$$)
get_pack($)
get_pack_name($)
get_pack_file_name($)
get_modules_dep_list($$$)
get_scripts_dep_list($$$)
get_tests_dep_list($$$)
TEST($)

FUNCTION DOCUMENTATION

BEGIN()

A setup routine for this module which creates get/set methods for the following attributes: name - name of this package. description - short description of what the package does. longdescription - long description of what the package does. license - license for this package. version - version number for the distribution archive. uname - user name for the distribution archive. gname - group name for the distribution archive. author - author information for this package. modules - modules distributed in this package. scripts - script files in this package. tests - test files in this package. files - regular files in this package. credits - credit information for this package.

init($)

Post construction internal method.

add_deps($$$)

This method will add dependency information to a deps object it receives.

get_pack($)

This method returns the basic package name (just name and version).

get_pack_name($)

This method returns the package name that this package should have (a CPAN name).

get_pack_file_name($)

This method gets a module name (baseline relative) for the package file.

get_modules_dep_list($$$)

This method returns the list of modules which are dependant on the modules in the package.

A few notes on the algorithm: 1. A new dep graph is created. The deps are collected but care is given not to revisit same nodes by use of a hash table which stores which nodes were visited. 2. When collecting deps both internal and external nodes are followed. I'm still not sure about this. 3. After all of this a set is created and all the elements which are wanted are collected into it. 4. If the hash mentioned above is not used and nodes are revisited performance drops at a quadratic rate (for 250 modules it goes from 10 seconds to 130 seconds).

get_scripts_dep_list($$$)

This method returns the list of scripts which are dependant on the scripts in the package.

get_tests_dep_list($$$)

This method returns the list of tests which are dependant on the tests in the package.

TEST($)

Test suite for this module.

SUPER CLASSES

None.

BUGS

None.

AUTHOR

Name: Mark Veltzer
Email: mailto:veltzer@cpan.org
WWW: http://www.veltzer.org
CPAN id: VELTZER

HISTORY

0.00 MV perl packaging
0.01 MV more perl packaging
0.02 MV perl packaging again
0.03 MV perl packaging again
0.04 MV validate writing
0.05 MV PDMT
0.06 MV some chess work
0.07 MV fix database problems
0.08 MV more database issues
0.09 MV md5 project
0.10 MV database
0.11 MV perl module versions in files
0.12 MV movies and small fixes
0.13 MV thumbnail user interface
0.14 MV import tests
0.15 MV more thumbnail issues
0.16 MV website construction
0.17 MV web site development
0.18 MV web site automation
0.19 MV SEE ALSO section fix

SEE ALSO

Meta::Class::MethodMaker(3), Meta::Development::Deps(3), Meta::Ds::Array(3), Meta::Ds::Oset(3), Meta::Info::Author(3), Meta::Lang::Perl::Deps(3), strict(3)

TODO

-unite the 3 dep routines here which are almost the same.

-add a misc files section for the license etc... (this way these files won't be hardcoded here).