Graphics::Primitive::ComponentList(3pm) | User Contributed Perl Documentation | Graphics::Primitive::ComponentList(3pm) |
Graphics::Primitive::ComponentList - List of Components
Maintains a list of components and their constraints. This is implemented as a class to provide functionality above and beyond a simple array.
my $c = Graphics::Primitive::ComponentList->new; $c->add_component($comp, $constraint); my $cindex = $c->find_component($comp->name);
Before the component is added, it is passed to the validate_component method. If validate_component does not return a true value, then the component is not added.
my $flist = $list->each( sub{ my ($component, $constraint) = @_; $comp->class('foo) } );
my $flist = $list->find( sub{ my ($component, $constraint) = @_; return $comp->class eq 'foo' } );
If no matching components are found then a new list is returned so that simple calls liked $container->find(...)->each(...) don't explode.
Copyright 2008-2009 by Cory G Watson.
Please report any bugs or feature requests to "bug-geometry-primitive at rt.cpan.org", or through the web interface at <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Geometry-Primitive>. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
Copyright 2008-2009 by Cory G Watson.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
2022-06-14 | perl v5.34.0 |