Use LWP to call mason components from scrips?

Is there a better solution than using LWP to call mason components from
inside scrips?

Or would you turn the component into a perl module and call that from both?

Paul Boldra
Lead Developer
ticketsystem.de

Is there a better solution than using LWP to call mason components from
inside scrips?
You just don’t need to do that.

Or would you turn the component into a perl module and call that from both?
Yep, RT WebUI uses API and really is wrapper around it. Also scrip
code could be fired when there is no httpd server running.

Paul Boldra
Lead Developer
ticketsystem.de


The rt-users Archives

Community help: http://wiki.bestpractical.com
Commercial support: sales@bestpractical.com

Discover RT’s hidden secrets with RT Essentials from O’Reilly Media.
Buy a copy at http://rtbook.bestpractical.com

We’re hiring! Come hack Perl for Best Practical: Careers — Best Practical Solutions

Best regards, Ruslan.

Ruslan Zakirov wrote:

Or would you turn the component into a perl module and call that from both?

Yep, RT WebUI uses API and really is wrapper around it. Also scrip
code could be fired when there is no httpd server running.

WebUI uses the RT API, but I want to use my own mason components from
inside a scrip. Exactly because there may be no httpd running, there’s
no way to use $m->scomp. I’d also be interested if there’s any way of
using features in the autohandler from a scrip.

OTOH I’ve found adding perl modules to mason components problematic;
especially since I’m using fastCGI instead of mod_perl. I can’t preload
the module in the apache config (or can in?), so where should I load it?