You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by Robert Landrum <rl...@aol.net> on 2002/08/06 22:58:27 UTC

[OT] Mason Question

Is there an easy way to do a perl -c masoncomponent.mc?  I hate having to copy
it to the dev server, and risk other people seeing it before I find out if it
even compiles...

I searched google, but didn't come up with anything.

Suggestions?

Rob

Re: [OT] Mason Question

Posted by Ray Zimmerman <rz...@cornell.edu>.
At 4:58 PM -0400 8/6/02, Robert Landrum wrote:
>Is there an easy way to do a perl -c masoncomponent.mc?  I hate having to copy
>it to the dev server, and risk other people seeing it before I find out if it
>even compiles...
>
>I searched google, but didn't come up with anything.
>
>Suggestions?

You can write a little perl script that runs Mason in standalone 
mode, as follows ...

my $output;
my $interp = HTML::Mason::Interp->new(
		comp_root  => /my/comp_root,
		out_method => \$output
	);
$interp->exec('/masoncomponent.mc',  %args);

See the "Standalone Mode" section of the Interpreter manual at 
http://www.masonhq.com/docs/manual/Admin.html#running_outside_of_mod_perl

-- 
  Ray Zimmerman  / e-mail: rz10@cornell.edu / 428-B Phillips Hall
   Sr Research  /   phone: (607) 255-9645  /  Cornell University
    Associate  /      FAX: (815) 377-3932 /   Ithaca, NY  14853