[Prev] Thread [Next]  |  [Prev] Date [Next]

Re: [Mason] Extreme Newbie: how to use the value of title method in an if statement Hans Dieter Pearcey Tue May 05 11:00:29 2009

On Tue, May 05, 2009 at 11:53:54AM -0500, Sara Gil wrote:
> Hi,
> I'd like to use the value of "title" (defined in <%method
> title>Home</%method>) in an if statement, something like:
> if (title == $menu_item)...

  my $title = $m->request_comp->scall_method('title');
  if ($title eq $menu_item) { ... }

Assuming, of course, that the title method is defined in the component that the
request is coming in for -- that is, the component that autohandlers are
wrapping, etc.  See HTML::Mason::Request for more details on request_comp.


The NEW KODAK i700 Series Scanners deliver under ANY circumstances! Your
production scanning environment may not be a perfect world - but thanks to
Kodak, there's a perfect scanner to get the job done! With the NEW KODAK i700
Series Scanner you'll get full speed at 300 dpi even with all image 
processing features enabled.
Mason-users mailing list