From e767951f92d57740dc76425868cce32f6bcf1296 Mon Sep 17 00:00:00 2001 From: Aaron Trevena Date: Fri, 18 May 2007 17:33:32 +0000 Subject: [PATCH] removed C3 and no longer require it git-svn-id: http://svn.maypole.perl.org/Maypole/trunk@563 48953598-375a-da11-a14b-00016c27c3ee --- Changes | 4 +++- Makefile.PL | 1 - lib/Maypole.pm | 5 ++--- lib/Maypole/Manual/Inheritance.pod | 6 ++---- lib/Maypole/Model/Base.pm | 1 - lib/Maypole/Model/CDBI.pm | 1 - lib/Maypole/Model/CDBI/AsForm.pm | 2 -- lib/Maypole/Model/CDBI/Base.pm | 1 - lib/Maypole/Model/CDBI/DFV.pm | 1 - lib/Maypole/Model/CDBI/Plain.pm | 1 - lib/Maypole/View/Base.pm | 1 - lib/Maypole/View/TT.pm | 1 - lib/Maypole/templates/factory/macros | 2 +- 13 files changed, 8 insertions(+), 19 deletions(-) diff --git a/Changes b/Changes index 155c842..71b8f4d 100644 --- a/Changes +++ b/Changes @@ -5,7 +5,6 @@ For information about current developments and future releases, see: 2.12 October 2006 Fixed some db_colinfo test bugs Fixed typo in edit form template - Now uses Class::C3 in all Classes to simplify inheritence Inheritence simpler and nicer and less hacked add_model_superclass method moves @ISA munging into the model new Class::DBI::DFV based model @@ -28,6 +27,9 @@ For information about current developments and future releases, see: change to view::base to only call display_columns, stringify_columns, to_cgi if model class can changed template path to only look for custom, factory, etc on first/only path provided +2.111 Mon 30 April 2007 + - forked - see 2.111 changelog + 2.11 Mon 31 July 2006 SVN revision 519 diff --git a/Makefile.PL b/Makefile.PL index 6d6cdfb..935c677 100644 --- a/Makefile.PL +++ b/Makefile.PL @@ -31,7 +31,6 @@ WriteMakefile( Digest::MD5 => 0, File::MMagic::XS => 0.08, Class::DBI::Plugin::Type => 0, - Class::C3 => 0.14, }, # e.g., Module::Name => 1.1 ( $] >= 5.005 diff --git a/lib/Maypole.pm b/lib/Maypole.pm index 596479e..1ac5ff4 100644 --- a/lib/Maypole.pm +++ b/lib/Maypole.pm @@ -1,5 +1,4 @@ package Maypole; -use Class::C3; use base qw(Class::Accessor::Fast Class::Data::Inheritable); use UNIVERSAL::require; use strict; @@ -1294,9 +1293,9 @@ sub param $self->params->{$key} = $new_val; } - return ref $val ? @$val : ($val) if wantarray; + return (ref $val eq 'ARRAY') ? @$val : ($val) if wantarray; - return ref $val ? $val->[0] : $val; + return (ref $val eq 'ARRAY') ? $val->[0] : $val; } diff --git a/lib/Maypole/Manual/Inheritance.pod b/lib/Maypole/Manual/Inheritance.pod index 76d7611..950283d 100644 --- a/lib/Maypole/Manual/Inheritance.pod +++ b/lib/Maypole/Manual/Inheritance.pod @@ -78,8 +78,8 @@ a set of auto-generated model classes, and a view class: =head2 Ouch, that's a lot of inheritence! -Yes, that's a lot of inheritence, fortunately as of 2.12 Maypole uses -L to ensure sane method resolution. +Yes, that's a lot of inheritence, at some point in the future - probably Maypole 3.x we +will move to Class::C3 =head2 What about Maypole::Application - loading plugins @@ -235,8 +235,6 @@ The resulting model looks like this: =head3 Features -*REWRITE BASED ON C3 and push instead of shift* - 1. Non-Maypole applications using the Offline model are completely isolated from the Maypole application, and need not know it exists at all. diff --git a/lib/Maypole/Model/Base.pm b/lib/Maypole/Model/Base.pm index d8592bc..307d48b 100644 --- a/lib/Maypole/Model/Base.pm +++ b/lib/Maypole/Model/Base.pm @@ -1,6 +1,5 @@ package Maypole::Model::Base; use strict; -use Class::C3; use Maypole::Constants; use attributes (); diff --git a/lib/Maypole/Model/CDBI.pm b/lib/Maypole/Model/CDBI.pm index cc78879..b3223c4 100644 --- a/lib/Maypole/Model/CDBI.pm +++ b/lib/Maypole/Model/CDBI.pm @@ -24,7 +24,6 @@ will instead use Class::DBI classes provided. =cut use base qw(Maypole::Model::CDBI::Base); -use Class::C3; use Data::Dumper; use Class::DBI::Loader; use attributes (); diff --git a/lib/Maypole/Model/CDBI/AsForm.pm b/lib/Maypole/Model/CDBI/AsForm.pm index cad330c..d76ecb4 100644 --- a/lib/Maypole/Model/CDBI/AsForm.pm +++ b/lib/Maypole/Model/CDBI/AsForm.pm @@ -1,6 +1,4 @@ package Maypole::Model::CDBI::AsForm; - -use Class::C3; use strict; use warnings; diff --git a/lib/Maypole/Model/CDBI/Base.pm b/lib/Maypole/Model/CDBI/Base.pm index 6ecc213..d933c5b 100644 --- a/lib/Maypole/Model/CDBI/Base.pm +++ b/lib/Maypole/Model/CDBI/Base.pm @@ -1,6 +1,5 @@ package Maypole::Model::CDBI::Base; use strict; -use Class::C3; =head1 NAME diff --git a/lib/Maypole/Model/CDBI/DFV.pm b/lib/Maypole/Model/CDBI/DFV.pm index ca3609c..5aa0e9a 100644 --- a/lib/Maypole/Model/CDBI/DFV.pm +++ b/lib/Maypole/Model/CDBI/DFV.pm @@ -35,7 +35,6 @@ of CGI::Untaint. For teh win!! =cut -use Class::C3; use Data::FormValidator; use Data::Dumper; diff --git a/lib/Maypole/Model/CDBI/Plain.pm b/lib/Maypole/Model/CDBI/Plain.pm index 0ca9bc9..4398fac 100644 --- a/lib/Maypole/Model/CDBI/Plain.pm +++ b/lib/Maypole/Model/CDBI/Plain.pm @@ -34,7 +34,6 @@ tables and set up the inheritance relationships as normal. =cut -use Class::C3; use Maypole::Config; use base 'Maypole::Model::CDBI::Base'; diff --git a/lib/Maypole/View/Base.pm b/lib/Maypole/View/Base.pm index 81e5044..9863e15 100644 --- a/lib/Maypole/View/Base.pm +++ b/lib/Maypole/View/Base.pm @@ -1,5 +1,4 @@ package Maypole::View::Base; -use Class::C3; use File::Spec; use UNIVERSAL::moniker; use strict; diff --git a/lib/Maypole/View/TT.pm b/lib/Maypole/View/TT.pm index d2da45a..6a3bfe6 100644 --- a/lib/Maypole/View/TT.pm +++ b/lib/Maypole/View/TT.pm @@ -1,5 +1,4 @@ package Maypole::View::TT; -use Class::C3; use base 'Maypole::View::Base'; use Maypole::Constants; use Template; diff --git a/lib/Maypole/templates/factory/macros b/lib/Maypole/templates/factory/macros index ce9d0e1..d2192bd 100644 --- a/lib/Maypole/templates/factory/macros +++ b/lib/Maypole/templates/factory/macros @@ -14,7 +14,7 @@ catenating the base URL, table, command, and any arguments. [% MACRO link(table, command, additional, label) BLOCK; SET lnk = base _ "/" _ table _ "/" _ command _ "/" _ additional; - lnk = lnk | uri | html; + lnk = lnk | uri ; ''; label | html; ""; -- 2.39.2