# the contents of the Makefile that is written.
WriteMakefile(
NAME => 'Apache::MVC',
- VERSION_FROM => 'MVC.pm', # finds $VERSION
+ VERSION_FROM => 'lib/Apache/MVC.pm', # finds $VERSION
PREREQ_PM => {}, # e.g., Module::Name => 1.1
($] >= 5.005 ? ## Add these new keywords supported since 5.005
- (ABSTRACT_FROM => 'MVC.pm', # retrieve abstract from module
+ (ABSTRACT_FROM => 'lib/Apache/MVC.pm', # retrieve abstract from module
AUTHOR => 'Simon Cozens <simon@nonet>') : ()),
);
use Class::DBI::Loader;
use strict;
use warnings;
+our $VERSION = "1.0";
-__PACKAGE__->mk_classdata(qw( _config init_done view_object ));
+__PACKAGE__->mk_classdata($_) for qw( _config init_done view_object );
__PACKAGE__->mk_accessors ( qw( config ar params objects model_class args ));
__PACKAGE__->config({});
__PACKAGE__->init_done(0);
return DECLINED() unless $cv;
# Is it exported?
- my $attribs = join " ", attributes::get($cv);
- return DECLINED() unless $attribs =~ /\b(Exported|Class|Single|Multiple)\b/i;
+ $self->{method_attribs} = join " ", attributes::get($cv);
+ return DECLINED()
+ unless $self->{method_attribs} =~ /\b(Exported|Class|Single|Multiple)\b/i;
return OK();
}
+sub find_objects {
+ # First, how many arguments are we?
+}
sub authenticate { return 200 }
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl 1.t'
+# vim:ft=perl
+use Test::More 'no_plan';
-#########################
+package Fake::Loader;
-# change 'tests => 1' to 'tests => last_test_to_print';
+package Fake::MVC;
+use base 'Apache::MVC';
-use Test;
-BEGIN { plan tests => 1 };
-use Apache::MVC;
-ok(1); # If we made it this far, we're ok.
+sub set_database {
+ my $self = shift;
+ $self->config->{loader} = bless {}, Fake::Loader;
+}
-#########################
-
-# Insert your test code below, the Test::More module is use()ed here so read
-# its man page ( perldoc Test::More ) for help writing this test script.
+sub get_request {}
+sub parse_location {
+ my $self = shift;
+ my @pi = @Fake::MVC::url;
+ shift @pi while @pi and !$pi[0];
+ $self->{table} = shift @pi;
+ $self->{action} = shift @pi;
+ $self->{args} = \@pi;
+}