NAME
Devel::PerlySense::Class - A Perl Class
SYNOPSIS
DESCRIPTION
A Perl Class is a Perl Package with an OO interface.
PROPERTIES
oPerlySense
Devel::PerlySense object.
Default: set during new()
name
The Class name (i.e. the package name)
Default: ""
raDocument
Array ref with PerlySense::Document objects that define this class.
Default: []
rhClassBase
Hash ref with (keys: base class names; values: base class PerlySense::Class objects).
Default: {}
API METHODS
new(oPerlySense, name, raDocument, rhClassSeen => {})
Create new PerlySense::Class object. Give it $name and associate it with $oPerlySense.
$rhClassSeen is used to keep track of seen base classes in case we encounter circular deps.
newFromFileAt(oPerlySense => $oPerlySense, file => $file, row => $row, col => $col)
Create new PerlySense::Class object given the class found at $row, $col in $file.
If there was no package started yet at $row, $col, but there is one later in the file, use the first one instead (this is when you're at the top of the file and the package statement didn't happen yet).
Return new object, or undef if no class was found, or die if the file doesn't exist.
newFromName(oPerlySense, name, dirOrigin, rhClassSeen)
Create new PerlySense::Class object given the class $name.
Look for the module file starting at $dirOrigin.
Return new object, or undef if no class was found with that $name.
findBaseClasses(rhClassSeen)
Find the base classes of this class and set (replace) rBaseClass with newly created Class objects.
Reuse any class names and objects in $rhClassSeen (keys: class names; values: Class objects), i.e. don't follow them upwards, they have already been taken care of.
rhClassSub()
Find the sub classes of this class and return a hash ref with (keys: Class names; values: Class objects).
Look for subclasses in the directory of this Class, and below.
(In the future, look in all of the current project.)
(this is a horribly inefficient way of finding subclasses. When there is Project with metadata, use that instead of looking everywhere).
rhDirNameClassInNeighbourhood()
Find the classes in the neighbourhood of this class and return a hash ref with (keys: up, current, down; values: array refs with (Package names).
aNameClassInDir(dir => $dir)
Find the classes names in the .pm files in $dir and return a list of Class names.
aNameModuleUse()
Return array with the names of the "use MODULE" modules in the Class.
AUTHOR
Johan Lindström, <johanl[ÄT]DarSerMan.com>
BUGS
Please report any bugs or feature requests to bug-devel-perlysense@rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Devel-PerlySense. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
Copyright 2005 Johan Lindström, All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
1 POD Error
The following errors were encountered while parsing the POD:
- Around line 391:
Non-ASCII character seen before =encoding in 'Lindström,'. Assuming CP1252