FBP::Children - Role for objects which can contain other objects
my $dialog = $object->find_first( isa => 'FBP::Dialog', name => 'MyDialog1', );
The find_first method implements a generic depth-first search of the object model. It takes a series of condition pairs that are used in the provided order (allowing the caller to tune the way in which the filter is done).
find_first
Each pair is treated as a method + value set. First, the object is checked to ensure it has that method, and then the method output is string-matched to the output of the method via $object->$method() eq $value.
$object->$method() eq $value
The special condition "isa" is applied as $object->isa($value) instead.
$object->isa($value)
Returns the first object located that matches the provided criteria, or undef if nothing in the object model matches the conditions.
undef
Bugs should be reported via the CPAN bug tracker at
http://rt.cpan.org/NoAuth/ReportBug.html?Queue=FBP
For other issues, or commercial enhancement or support, contact the author.
Adam Kennedy <adamk@cpan.org>
Copyright 2009 - 2012 Adam Kennedy.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
The full text of the license can be found in the LICENSE file included with this module.
To install FBP, copy and paste the appropriate command in to your terminal.
cpanm
cpanm FBP
CPAN shell
perl -MCPAN -e shell install FBP
For more information on module installation, please visit the detailed CPAN module installation guide.