| Devel-PerlySense documentation | Contained in the Devel-PerlySense distribution. |
Devel::PerlySense::BookmarkConfig - A collection of Bookmark::Definition and their configuration.
This is the Bookmark config chunk, and the parsed Bookmark::Definition objects that results in.
Devel::PerlySense object.
Default: set during new()
Array ref with Bookmark::Definition objects from the oPerlySense config.
Create new BookmarkConfig object. Associate it with $oPerlySense.
Parse the text in $file and return list of Bookmark::MatchResult objects that have matches.
Die on errors, like if $file doesn't exist.
Johan Lindström, <johanl[ÄT]DarSerMan.com>
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.
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.
| Devel-PerlySense documentation | Contained in the Devel-PerlySense distribution. |
use strict; use warnings; package Devel::PerlySense::BookmarkConfig; our $VERSION = '0.01'; use Spiffy -Base; use Carp; use Data::Dumper; use File::Basename; use File::Path; use Path::Class; use Devel::PerlySense; use Devel::PerlySense::Util; use Devel::PerlySense::Util::Log; use Devel::PerlySense::Bookmark::Definition; use Devel::PerlySense::Bookmark::MatchResult;
field "oPerlySense" => undef;
sub raDefinition { return [ map { Devel::PerlySense::Bookmark::Definition->newFromConfig( %$_ ) } @{$self->oPerlySense->rhConfig->{bookmark}} ]; }
sub new { my ($oPerlySense) = Devel::PerlySense::Util::aNamedArg(["oPerlySense"], @_); $self = bless {}, $self; #Create the object. It looks weird because of Spiffy $self->oPerlySense($oPerlySense); return($self); }
sub aMatchResult { my ($file) = Devel::PerlySense::Util::aNamedArg(["file"], @_); defined( my $source = slurp($file) ) or die("Could not read source file ($file)\n"); $self->oPerlySense->setFindProject(file => $file) or debug("Could not identify any PerlySense Project for Bookmark matching, but that's not fatal\n"); my @aMatchResult = map { Devel::PerlySense::Bookmark::MatchResult->newFromMatch( oDefinition => $_, file => $file, source => $source ); } @{$self->raDefinition}; return(@aMatchResult); } 1; __END__