in one of my model classes...

foreach my $page (__PACKAGE__->retrieve_all()) {
  my $name = $page->name;
  no strict qw/refs/;
  *{__PACKAGE__.'::'.$name} = sub : Exported {
      my ($self, $r) = @_;
      my ($content) = __PACKAGE__->search(name=>$r->{args}->[0]);
      $r->objects([$content]);
      $r->template('content/view');
      return;
  }
}

evil or enlightened?

A.


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.  Get Certified Today
Register for a JBoss Training Course.  Free Certification Exam
for All Training Attendees Through End of 2005. For more info visit:
http://ads.osdn.com/?ad_idv28&alloc_id845&op=click
_______________________________________________
Maypole-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-devel

Reply via email to