Apache-Voodoo
view release on metacpan or search on metacpan
Removed dependency on IPC::Shareable
Fixed a rounding error in the window size code. This bug was only triggered when the window size
was set to an odd number; and event which rarely happens. This has allowed this bug to go
unnoticed for 9 years.
2.01 - 1/19/2007
================
Fixed glitch in upload handling under Apache 2, updated docs.
2.00 - 1/18/2007
================
Added support for Apache 2
1.22 - 12/18/2006
================
Bug fixes.
1.21 - 11/27/2006
lib/Apache/Voodoo/Table.pm view on Meta::CPAN
# make sure our additional constraint won't break the sql
$additional_constraint =~ s/^\s*(where|and|or)\s+//go;
if (length($additional_constraint)) {
$additional_constraint = "AND $additional_constraint";
}
unless ($params->{$self->{'pkey'}} =~ /$self->{'pkey_regexp'}/) {
return $self->display_error("Invalid ID");
}
# find the record to be updated
my $res = $dbh->selectall_arrayref("
SELECT ".
join(",",@{$self->{'columns'}}). "
FROM
$self->{'table'}
WHERE
$self->{'pkey'} = ?
$additional_constraint",
undef,
$params->{$self->{'pkey'}});
lib/Apache/Voodoo/Table/Probe/MySQL.pm view on Meta::CPAN
$column->{'type'} = 'time';
}
sub datetime {
my ($self,$column,$size) = @_;
$column->{'type'} = 'datetime';
}
sub timestamp {
# timestamp is a 'magically' updated column that we don't touch
}
1;
################################################################################
# Copyright (c) 2005-2010 Steven Edwards (maverick@smurfbane.org).
# All rights reserved.
#
# You may use and distribute Apache::Voodoo under the terms described in the
# LICENSE file include in this package. The summary is it's a legalese version
t/Application.t view on Meta::CPAN
isa_ok($app->{'controllers'}->{'a/controller'}, "Apache::Voodoo::Loader::Dynamic");
isa_ok($app->{'controllers'}->{'a/controller'}->{'object'},"app_newstyle::C::a::controller");
eq_or_diff($app->{'controllers'}->{'a/controller'}->handle,{a_controller => 'a controller'},'controller output ok');
ok(!$app->{'controllers'}->{'a/controller'}->can("foo"),"original controller doesn't have a foo method");
sleep(1); # so we can be sure the mtime is different on the copied file.
copy("$path/C/a/controller.pm.new","$path/C/a/controller.pm") || die "can't reset controller.pm: $!";
eq_or_diff($app->{'controllers'}->{'a/controller'}->handle,{a_controller => 'a new controller'},'updated controller output ok');
my $ok = ok($app->{'controllers'}->{'a/controller'}->can("foo"),'updated controller has a foo method');
SKIP: {
skip "controller didn't reload correctly",1 unless $ok;
eq_or_diff($app->{'controllers'}->{'a/controller'}->foo,'foo','updated controller foo() output');
}
sleep(1); # so we can be sure the mtime is different on the copied file.
copy("$path/C/a/controller.pm.orig","$path/C/a/controller.pm") || die "can't reset controller.pm: $!";
eq_or_diff($app->{'controllers'}->{'a/controller'}->handle,{a_controller => 'a controller'},'original controller output ok');
#
# check the models
#
isa_ok($app->{'models'}->{'a::model'}, "Apache::Voodoo::Loader::Dynamic");
isa_ok($app->{'models'}->{'a::model'}->{'object'},"app_newstyle::M::a::model");
eq_or_diff($app->{'models'}->{'a::model'}->get_foo,"foo",'model output ok');
sleep(1); # so we can be sure the mtime is different on the copied file.
copy("$path/M/a/model.pm.new","$path/M/a/model.pm") || die "can't reset model.pm: $!";
eq_or_diff($app->{'models'}->{'a::model'}->get_foo,"FOO!",'updated model output ok');
eq_or_diff($app->{'models'}->{'a::model'}->get_bar,"bar", 'updated model get_bar() works');
sleep(1); # so we can be sure the mtime is different on the copied file.
copy("$path/M/a/model.pm.orig","$path/M/a/model.pm") || die "can't reset model.pm: $!";
eq_or_diff($app->{'models'}->{'a::model'}->get_foo,"foo",'original model output ok');
#
# check the views
#
isa_ok($app->{'views'}->{'a::view'}, "Apache::Voodoo::Loader::Dynamic");
isa_ok($app->{'views'}->{'a::view'}->{'object'},"app_newstyle::V::a::view");
( run in 0.349 second using v1.01-cache-2.11-cpan-05444aca049 )