From: Chris Nehren Date: Wed, 11 Jul 2012 03:46:03 +0000 (-0400) Subject: some fixes to the still premature web frontend X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=7f822942820116d428705fe7f5b368f619541ffa;p=p5sagit%2FPromulger.git some fixes to the still premature web frontend --- diff --git a/lib/Promulger/Web.pm b/lib/Promulger/Web.pm index f549f1d..a3b7aa8 100644 --- a/lib/Promulger/Web.pm +++ b/lib/Promulger/Web.pm @@ -35,12 +35,12 @@ sub dispatch_request { my ($self, $list) = @_; [ 200, [ 'Content-type', 'text/html' ], [ $self->show_list($list) ] ] }, - sub (GET + /list/*/subscriber/*) { - my ($self, $list, $subscriber) = @_; + sub (GET + /list/*/subscriber/* + .*) { + my ($self, $list, $subscriber, $extension) = @_; [ 200, [ 'Content-type', 'text/html' ], - [ $self->show_subscriber($list, $subscriber) ] + [ $self->show_subscriber($list, $subscriber, $extension) ] ] }, sub (POST + /list/*/subscriber/*/unsubscribe) { @@ -113,10 +113,11 @@ method unsubscribe($list_name, $email) { return "

Unsubscribed ${email} from ${list_name}.

"; } -method show_subscriber($list_name, $subscriber) { +method show_subscriber($list_name, $subscriber, $extension) { + my $address = "${subscriber}.${extension}"; my $html = <<"HTML"; -

Subscriber ${subscriber}

-
+

Subscriber ${address}

+
HTML