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.
aBookmarkMatchResult()
Return array of Bookmark::MatchResult objects that matches the current source.
dirModule()
Return the base dir for this class, i.e. the dir in which the main .pm file is in.
oLocationMethodDoc(method => $method)
Find the docs for the $method name and return a Location object similar to PerlySense->oLocationMethodDocFromDocument, or undef if no doc could be found.
Die on errors.
oLocationMethodGoTo(method => $method)
Find the declaration for the $method name and return a Location object similar to PerlySense->oLocationSubDefinitionFromDocument, or undef if no declaration could be found.
Die on errors.
oLocationSubAt(row => $row, col => $col)
Return a Devel::PerlySense::Document::Location object with the location of the sub definition at $row/$col, or undef if it row/col isn't inside a sub definition.
Die on errors.
oLocationSub(name => $name)
Return a Devel::PerlySense::Document::Location object with the location of the sub declaration called $name, or undef if it wasn't found.
Die on errors.
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 504:
Non-ASCII character seen before =encoding in 'Lindström,'. Assuming CP1252