Hey, I appologize in advance also if this isn't a good place to ask perl/Mason questions. I prefer it over the higher volume Mason lists, but if this is the wrong place for it, I'd rather not step on people's toes.<br><br>
Anyway, I've got a perl module:<br><br><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">package Foo;</blockquote><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">
<div><br>our $m = HTML::Mason::Request::instance;<br></div></blockquote><blockquote style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;" class="gmail_quote">sub login_required<br>
{<br> unless ($m->session->{'userid'}) {<br> $m->comp('login.mhtml');<br> $m->abort;<br> }<br>}<br></blockquote><br>but this always fails saying that $m isn't instantiated. Everything works fine if I define the $m locally within each sub, but that gets annoying. I thought our should scope to the entire package. What's the propper way to take this on?
<br><br>Thanks<br>-d<br><br><br>-- <br>Dave Dash<br>612.670.0621<br>3555 Fremont Ave S, Mpls, MN 55408<br><a href="http://citybikemap.com/">http://citybikemap.com/</a><br><a href="http://davedash.com/">http://davedash.com/
</a><br>AIM: davesdash