Nope, nothing like this, though you could save a little repetition with:
if (my $comp = $m->fetch_comp('/path/to/possible/component')) {
$m->comp($comp);
}
On Nov 30, 2007, at 8:10 AM, Sherrard Burton wrote:
> i may have overlooked this in the documentation, but is there a
> $m->comp() equivalent to attr_if_exists()? obviously it's not
> critical,
> but it would be nice to be able to shortcut logic like this:
>
> % if ( $m->comp_exists( '/path/to/possible/component' ) ) {
> % $m->comp( '/path/to/possible/component' );
> % }
>
> to
>
> % $m->comp_if_exists( '/path/to/possible/component' );
>
> ----------------------------------------------------------------------
> ---
> SF.Net email is sponsored by: The Future of Linux Business White Paper
> from Novell. From the desktop to the data center, Linux is going
> mainstream. Let it simplify your IT future.
> http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
> _______________________________________________
> Mason-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/mason-users
>
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users