From fdef988c4b6e0c95310edfed99bcb1bb959a6da4 Mon Sep 17 00:00:00 2001 From: David Baird Date: Sun, 21 Aug 2005 12:43:51 +0000 Subject: [PATCH] moved ar accessor to Apache::MVC - bug 14014 git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@379 48953598-375a-da11-a14b-00016c27c3ee --- Changes | 1 + lib/Apache/MVC.pm | 2 ++ lib/Maypole.pm | 2 +- t/apache_mvc.t | 3 ++- t/maypole.t | 4 ++-- 5 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Changes b/Changes index a559aa5..e8706ad 100644 --- a/Changes +++ b/Changes @@ -16,6 +16,7 @@ For information about current developments and future releases, see: add() alias to push() in Mp::Headers (wishlist 14142) Fixed inheritance issues in Mp::Application - Mp::App now manipulates the caller's @ISA directly, and doesn't inject itself into the chain (bugs 12923 & 14120) + Moved ar accessor to Apache::MVC (bug 14014) 2.10 Tue 19 Jul 2005 Multiple Template Paths added ( http://rt.cpan.org/NoAuth/Bug.html?id=13447 ) diff --git a/lib/Apache/MVC.pm b/lib/Apache/MVC.pm index 62afc95..c9d6a32 100644 --- a/lib/Apache/MVC.pm +++ b/lib/Apache/MVC.pm @@ -8,6 +8,8 @@ use warnings; use base 'Maypole'; use Maypole::Headers; +__PACKAGE__->mk_accessors( qw( ar ) ); + BEGIN { my $version; eval 'use mod_perl2; $version = $mod_perl2::VERSION; '; diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 7854caf..b060f15 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -11,7 +11,7 @@ our $VERSION = '2.10'; __PACKAGE__->mk_classdata($_) for qw( config init_done view_object ); __PACKAGE__->mk_accessors( - qw( ar params query objects model_class template_args output path + qw( params query objects model_class template_args output path args action template error document_encoding content_type table headers_in headers_out ) ); diff --git a/t/apache_mvc.t b/t/apache_mvc.t index 07bfae9..e6a1100 100644 --- a/t/apache_mvc.t +++ b/t/apache_mvc.t @@ -3,7 +3,7 @@ use strict; use Test::More; BEGIN { if (eval { require Apache::Request }) { - plan tests => 2; + plan tests => 3; } else { Test::More->import(skip_all =>"Apache::Request is not installed: $@"); } @@ -11,6 +11,7 @@ BEGIN { require_ok('Apache::MVC'); ok($Apache::MVC::VERSION, 'defines $VERSION'); +ok(Apache::MVC->can('ar'), 'defines an "ar" accessor'); # defines $VERSION # uses mod_perl # @ISA = 'Maypole' diff --git a/t/maypole.t b/t/maypole.t index 4c07d21..63e7e65 100755 --- a/t/maypole.t +++ b/t/maypole.t @@ -1,7 +1,7 @@ #!/usr/bin/perl use strict; use warnings; -use Test::More tests => 108; +use Test::More tests => 107; use Test::MockModule; # module compilation @@ -23,7 +23,7 @@ ok(Maypole->can('init_done'), 'defines an init_done attribute'); ok(! Maypole->init_done, '... which is false by default'); ok(Maypole->can('view_object'), 'defines a view_object attribute'); is(Maypole->view_object, undef, '... which is undefined'); -ok(Maypole->can('ar'), 'defines an "ar" accessor'); +#ok(Maypole->can('ar'), 'defines an "ar" accessor'); moved to Apache::MVC ok(Maypole->can('params'), 'defines a "params" accessor'); ok(Maypole->can('query'), 'defines a "query" accessor'); ok(Maypole->can('objects'), 'defines an "objects" accessor'); -- 2.39.5