alfie has asked for the wisdom of the Perl Monks concerning the following question:

Hi!

I am currently sitting with a Mason problem to which I don't find any solution in the documentation -- I might just have looked at the wrong pages....

The problem is like this: How do I know if a given (file-based) component exists prior to calling it and wrapping that in an eval block? I've found the method_exists and the attr_exists function but I don't find something like a component_exists. The usual -r or such tests don't really work easy for I would have to know the component paths for that and loop around them. Isn't there an easy way to tell prior to calling a component if it exists at all?

Thank you in advance for any hints or suggestions.
--
use signature; signature(" So long\nAlfie");

  • Comment on HTML::Mason: How to know if a component exists?

Replies are listed 'Best First'.
Re: HTML::Mason: How to know if a component exists?
by valdez (Monsignor) on Jan 31, 2003 at 14:38 UTC

    It's called comp_exists. Ciao, Valerio

Re: HTML::Mason: How to know if a component exists?
by Anonymous Monk on Jan 31, 2003 at 14:49 UTC
    Why would you care? Just warp it in eval, it's ok.

    HTML::Mason::Resolver - Component path resolver base class