package WebGUI::Content::NewsletterManager; use strict; use warnings; use WebGUI::Pluggable; sub handler { my $session = shift; my $form = $session->form; my $module = $form->get('newsletter') || return; my $class = $module eq 'manage' ? 'WebGUI::Mailing::Admin' : $module eq 'mailing' ? 'WebGUI::Mailing' : $module eq 'bounce' ? 'WebGUI::Mailing::Bounce' : return ; my $func = 'www_' . ( $form->get('func') || 'view' ); my $id = $form->get('id'); my $object = WebGUI::Pluggable::instanciate( $class, 'new', [ $session, $id ] ); return $object->$func if $object->can( $func ); return; } 1;