The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

NAME

FBP::Children - Role for objects which can contain other objects

METHODS

find_first

  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).

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.

The special condition "isa" is applied as $object->isa($value) instead.

Returns the first object located that matches the provided criteria, or undef if nothing in the object model matches the conditions.

SUPPORT

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.

AUTHOR

Adam Kennedy <adamk@cpan.org>

COPYRIGHT

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.