Re: handler using a module

2008-02-20 Thread Raymond Wan
Hi Perrin, Perrin Harkins wrote: Yes, there is. Read the information in the Mason documentation about namespaces. There should be examples in there of how to do it. Thanks for the tip; I found it quite easily in the documentation and indeed there are examples and at least two options to

Re: handler using a module

2008-02-15 Thread Perrin Harkins
On Fri, Feb 15, 2008 at 12:16 PM, Raymond Wan <[EMAIL PROTECTED]> wrote: > I see. So if myOwnFunctions is used by many of my components, there is > no way to have it load once but used by all of the components? Yes, there is. Read the information in the Mason documentation about namespaces. T

Re: handler using a module

2008-02-15 Thread Perrin Harkins
On Thu, Feb 14, 2008 at 10:40 AM, Malcolm <[EMAIL PROTECTED]> wrote: > Mason uses it's own namespace for the code it generates from your templates. > So unless you have a "use lib...; use myOwnFunctions;" in your template, it > won't have your functions in scope. I don't think that explains why

Re: handler using a module

2008-02-15 Thread Raymond Wan
Hi Malcolm, Malcolm wrote: Mason uses it's own namespace for the code it generates from your templates. So unless you have a "use lib...; use myOwnFunctions;" in your template, it won't have your functions in scope. I see. So if myOwnFunctions is used by many of my components, there is

Re: handler using a module

2008-02-14 Thread Malcolm
On Thursday 14 February 2008 08:33:34 am Raymond Wan wrote: > So in an HTML file that will be processed by Mason, I call "myFunction > ()" and it says it is undefined. This surprised me since I indicated > that I am using myOwnFunctions in the handler with the "use" directive. > Is that not the w

Re: handler using a module

2008-02-14 Thread Raymond Wan
Hi Marcel, Marcel Greter wrote: I can only tell why myHandler::myFunction () is working. I think you export the myFunction in Module myOwnFunctions. I assume you didn't post that part of the code? Ah, yes -- I didn't think that was doing it but yes, I also have: require Exporter; our @ISA