Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight

HTML::Mason: How to know if a component exists?

by alfie (Pilgrim)
on Jan 31, 2003 at 14:11 UTC ( #231611=perlquestion: print w/replies, xml ) Need Help??

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


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

Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://231611]
Approved by AcidHawk
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (5)
As of 2022-01-20 12:09 GMT
Find Nodes?
    Voting Booth?
    In 2022, my preferred method to securely store passwords is:

    Results (56 votes). Check out past polls.