[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mason-cvs
Subject:    [Mason-checkins] CVS: mason/dist/t 20-plugins.t,1.5,1.6
From:       Jonathan Swartz <jswartz () users ! sourceforge ! net>
Date:       2004-12-13 20:22:31
Message-ID: E1CdwiF-00048o-AZ () sc8-pr-cvs1 ! sourceforge ! net
[Download RAW message or body]

Update of /cvsroot/mason/mason/dist/t
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv15898/dist/t

Modified Files:
	20-plugins.t 
Log Message:
add a _hook prefix to the name of each plugin hook method, to distinguish them from \
future user-accessible methods on plugin objects

Index: 20-plugins.t
===================================================================
RCS file: /cvsroot/mason/mason/dist/t/20-plugins.t,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- 20-plugins.t	16 Nov 2004 00:35:42 -0000	1.5
+++ 20-plugins.t	13 Dec 2004 20:22:28 -0000	1.6
@@ -5,21 +5,21 @@
 
 package HTML::Mason::Plugin::TestBeforeAndAfterRequest;
 use base qw(HTML::Mason::Plugin);
-sub start_request {
+sub start_request_hook {
     my ($self, $context) = @_;
     print "Before Request\n";
 }
-sub end_request {
+sub end_request_hook {
     print "After Request\n";
 }
 
 package HTML::Mason::Plugin::TestBeforeAndAfterComponent;
 use base qw(HTML::Mason::Plugin);
-sub start_component {
+sub start_component_hook {
     my ($self, $context) = @_;
     print "Before Component " . $context->comp->title . "\n";
 }
-sub end_component {
+sub end_component_hook {
     my ($self, $context) = @_;
     print "After Component " . $context->comp->title . "\n";
 }
@@ -27,77 +27,77 @@
 # test the ordering of plugin calls
 package HTML::Mason::Plugin::TestAllCalls;
 use base qw(HTML::Mason::Plugin);
-sub start_request {
+sub start_request_hook {
     my ($self, $context) = @_;
     my $rcomp = $context->request->request_comp()->title;
     print "AllCalls Request Start on: $rcomp\n";
 }
-sub end_request {
+sub end_request_hook {
     my ($self, $context) = @_;
     my $rcomp = $context->request->request_comp()->title;
     print "AllCalls Request Finish on: $rcomp\n";
 }
-sub start_component {
+sub start_component_hook {
     my ($self, $context) = @_;
     print "AllCalls Before Component " . $context->comp->title . "\n";
 }
-sub end_component {
+sub end_component_hook {
     my ($self, $context) = @_;
     print "AllCalls After Component " . $context->comp->title . "\n";
 }
 
 package HTML::Mason::Plugin::TestResetEachRequest;
 use base qw(HTML::Mason::Plugin);
-sub start_request {
+sub start_request_hook {
     my ($self, $context) = @_;
     my $rcomp = $context->request->request_comp->title();
     print "PreRequest: " . ++ $self->{count} . " : $rcomp\n";
 }
-sub end_request {
+sub end_request_hook {
     my ($self, $context) = @_;
     my $rcomp = $context->request->request_comp->title();
     print "PostRequest: " . ++ $self->{count} . " : $rcomp\n";
 }
-sub start_component {
+sub start_component_hook {
     my ($self, $context) = @_;
     print "PreComponent: " . ++ $self->{count} . " : " . $context->comp->title() \
."\n";  }
-sub end_component {
+sub end_component_hook {
     my ($self, $context) = @_;
     print "PostComponent: " . ++ $self->{count} . " : " . $context->comp->title() \
."\n";  }
 
 package HTML::Mason::Plugin::TestErrorStartRequest;
 use base qw(HTML::Mason::Plugin);
-sub start_request {
+sub start_request_hook {
     my ($self, $context) = @_;
     die("plugin error on start request " . $context->request->request_comp->title);
 }
 
 package HTML::Mason::Plugin::TestErrorEndRequest;
 use base qw(HTML::Mason::Plugin);
-sub end_request {
+sub end_request_hook {
     my ($self, $context) = @_;
     die("plugin error on end request " . $context->request->request_comp->title);
 }
 
 package HTML::Mason::Plugin::TestErrorStartComponent;
 use base qw(HTML::Mason::Plugin);
-sub start_component {
+sub start_component_hook {
     my ($self, $context) = @_;
     die("plugin error on start component " . $context->comp->title);
 }
 
 package HTML::Mason::Plugin::TestErrorEndComponent;
 use base qw(HTML::Mason::Plugin);
-sub end_component {
+sub end_component_hook {
     my ($self, $context) = @_;
     die("plugin error on end component " . $context->comp->title);
 }
 
 package HTML::Mason::Plugin::TestModifyReturnEndComponent;
 use base qw(HTML::Mason::Plugin);
-sub end_component {
+sub end_component_hook {
     my ($self, $context) = @_;
     my $result = $context->result;
     if (defined($result->[0])) {
@@ -107,7 +107,7 @@
 
 package HTML::Mason::Plugin::TestModifyReturnEndRequest;
 use base qw(HTML::Mason::Plugin);
-sub end_request {
+sub end_request_hook {
     my ($self, $context) = @_;
     my $result = $context->result;
     if (defined($result->[0])) {
@@ -117,7 +117,7 @@
 
 package HTML::Mason::Plugin::TestCatchErrorEndComponent;
 use base qw(HTML::Mason::Plugin);
-sub end_component {
+sub end_component_hook {
     my ($self, $context) = @_;
     my $error = $context->error;
     if (defined($$error)) {
@@ -128,7 +128,7 @@
 
 package HTML::Mason::Plugin::TestCatchErrorEndRequest;
 use base qw(HTML::Mason::Plugin);
-sub end_request {
+sub end_request_hook {
     my ($self, $context) = @_;
     my $error = $context->error;
     if (defined($$error)) {
@@ -139,7 +139,7 @@
 
 package HTML::Mason::Plugin::TestEndRequestModifyOutput;
 use base qw(HTML::Mason::Plugin);
-sub end_request {
+sub end_request_hook {
     my ($self, $context) = @_;
     my $content_ref = $context->output;
     $$content_ref = uc($$content_ref);



-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
Mason-checkins mailing list
Mason-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/mason-checkins


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic