Apache-Voodoo
view release on metacpan or search on metacpan
lib/Apache/Voodoo/MP/V1.pm view on Meta::CPAN
1011121314151617181920212223242526272829use
Apache::Request;
use
Apache::Cookie;
sub
declined {
return
Apache::Constants::DECLINED; }
sub
forbidden {
return
Apache::Constants::FORBIDDEN; }
sub
ok {
return
Apache::Constants::OK; }
sub
server_error {
return
Apache::Constants::SERVER_ERROR; }
sub
not_found {
return
Apache::Constants::NOT_FOUND; }
sub
content_type {
shift
()->{
'r'
}->send_http_header(
@_
); }
sub
err_header_out {
shift
()->{
'r'
}->err_header_out(
@_
); }
sub
header_in {
shift
()->{
'r'
}->header_in(
@_
); }
sub
header_out {
shift
()->{
'r'
}->header_out(
@_
); }
sub
redirect {
my
$self
=
shift
;
my
$loc
=
shift
;
lib/Apache/Voodoo/MP/V2.pm view on Meta::CPAN
1718192021222324252627282930313233343536use
Apache2::Upload;
use
Apache2::Cookie;
sub
declined {
return
Apache2::Const::DECLINED; }
sub
forbidden {
return
Apache2::Const::FORBIDDEN; }
sub
unauthorized {
return
Apache2::Const::AUTH_REQUIRED;}
sub
ok {
return
Apache2::Const::OK; }
sub
server_error {
return
Apache2::Const::SERVER_ERROR; }
sub
not_found {
return
Apache2::Const::NOT_FOUND; }
sub
content_type {
shift
()->{
'r'
}->content_type(
@_
); }
sub
err_header_out {
shift
()->{
'r'
}->err_headers_out->add(
@_
); }
sub
header_in {
shift
()->{
'r'
}->headers_in->{
shift
()}; }
sub
header_out {
shift
()->{
'r'
}->headers_out->add(
@_
); }
sub
redirect {
my
$self
=
shift
;
my
$loc
=
shift
;
lib/Apache/Voodoo/Soap.pm view on Meta::CPAN
727374757677787980818283848586878889909192my
$return
;
if
(
$self
->{
'mp'
}->is_get() &&
$r
->unparsed_uri =~ /\?wsdl$/) {
my
$uri
=
$self
->{
'mp'
}->uri();
$uri
=~ s/^\///;
$uri
=~ s/\/$//;
# FIXME hack. Shouldn't be looking in there to get this
unless
(
$self
->{
'engine'
}->_app->{
'controllers'
}->{
$uri
}) {
return
$self
->{
'mp'
}->not_found();
}
my
$m
=
ref
(
$self
->{
'engine'
}->_app->{
'controllers'
}->{
$uri
});
if
(
$m
eq
"Apache::Voodoo::Loader::Dynamic"
) {
$m
=
ref
(
$self
->{
'engine'
}->_app->{
'controllers'
}->{
$uri
}->{
'object'
});
}
# FIXME here ends the hackery
my
$wsdl
;
eval
{
lib/Apache/Voodoo/Soap.pm view on Meta::CPAN
148149150151152153154155156157158159160161162163164165166167168169$filename
=~ s/\/$//;
$filename
=~ s/\.tmpl$//;
unless
(
$self
->{
'run'
}->{
'method'
} eq
'handle'
) {
$filename
=~ s/([\w_]+)$/
$self
->{
'run'
}->{
'method'
}_$1/i;
$uri
=~ s/([\w_]+)$/
$self
->{
'run'
}->{
'method'
}_$1/i;
}
unless
(-e
"$filename.tmpl"
&&
-r
"$filename.tmpl"
) {
$self
->{
'status'
} =
$self
->{
'mp'
}->not_found();
$self
->_client_fault(
$self
->{
'mp'
}->not_found(),
'No such service:'
.
$filename
);
};
my
$content
;
eval
{
$self
->{
'engine'
}->begin_run();
$content
=
$self
->{
'engine'
}->execute_controllers(
$uri
,
$params
);
};
if
(
my
$e
= Exception::Class->caught()) {
if
(
$e
->isa(
"Apache::Voodoo::Exception::Application::Redirect"
)) {
lib/Apache/Voodoo/Test.pm view on Meta::CPAN
185186187188189190191192193194195196197198199200201202203204205
$self
->content_type(
'text/plain'
);
$self
->
(
"No WSDL generator installed. Either install Pod::WSDL or Pod::WSDL2"
);
return
$self
->ok;
}
# copied straight from Soap.pm
# FIXME hack. Shouldn't be looking in there to get this
$uri
=~ s/^\/+//;
unless
(
$self
->{
'engine'
}->_app->{
'controllers'
}->{
$uri
}) {
return
$self
->not_found();
}
my
$m
=
ref
(
$self
->{
'engine'
}->_app->{
'controllers'
}->{
$uri
});
if
(
$m
eq
"Apache::Voodoo::Loader::Dynamic"
) {
$m
=
ref
(
$self
->{
'engine'
}->_app->{
'controllers'
}->{
$uri
}->{
'object'
});
}
# FIXME here ends the hackery
my
$wsdl
;
eval
{
lib/Apache/Voodoo/Test.pm view on Meta::CPAN
343344345346347348349350351352353354355356357358359360361362363}
sub
status {
return
$_
[0]->{
'status'
}; }
sub
declined {
my
$self
=
shift
;
$self
->{
'status'
} =
"DECLINED"
;
return
$self
->{
'status'
}; }
sub
forbidden {
my
$self
=
shift
;
$self
->{
'status'
} =
"FORBIDDEN"
;
return
$self
->{
'status'
}; }
sub
unauthorized {
my
$self
=
shift
;
$self
->{
'status'
} =
"AUTH_REQUIRED"
;
return
$self
->{
'status'
}; }
sub
ok {
my
$self
=
shift
;
$self
->{
'status'
} =
"OK"
;
return
$self
->{
'status'
}; }
sub
server_error {
my
$self
=
shift
;
$self
->{
'status'
} =
"SERVER_ERROR"
;
return
$self
->{
'status'
}; }
sub
not_found {
my
$self
=
shift
;
$self
->{
'status'
} =
"NOT_FOUND"
;
return
$self
->{
'status'
}; }
sub
content_type {
my
$self
=
shift
;
$self
->{
'content_type'
} =
shift
if
scalar
(
@_
);
return
$self
->{
'content_type'
};
}
sub
err_header_out {
my
$self
=
shift
;
t/test_data/test_db.sql view on Meta::CPAN
212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
a_text text
);
INSERT INTO avt_table VALUES(1,1,0,
'2009-01-01'
,
'13:00:00'
,
'2000-02-01 12:00:00'
,
'a text string'
,
'a much larger text string'
);
INSERT INTO avt_table VALUES(2,2,1,
'2010-01-01'
,
'17:00:00'
,
'2010-02-01 14:00:00'
,
'another text string'
,
'different much longer string'
);
INSERT INTO avt_table VALUES(3,4,1,
'2010-03-15'
,
'16:00:00'
,
'2010-01-01 12:00:00'
,
'loren ipsum solor sit amet'
,
'consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.'
);
DROP TABLE IF EXISTS avt_all_types;
CREATE TABLE avt_all_types (
id
int
unsigned not null primary key,
bigint_not_null bigint not null,
bigint_null bigint null,
bigint_unsigned_not_null bigint unsigned not null,
bigint_unsigned_null bigint unsigned null,
char_not_null char(32) not null,
char_null char(32) null,
date_not_null date not null,
date_null date null,
decimal_not_null decimal(4,2) not null,
decimal_null decimal(4,2) null,
int_not_null
int
not null,
int_null
int
null,
int_unsigned_not_null
int
unsigned not null,
int_unsigned_null
int
unsigned null,
integer_not_null integer not null,
integer_null integer null,
mediumint_not_null mediumint not null,
mediumint_null mediumint null,
mediumint_unsigned_not_null mediumint unsigned not null,
mediumint_unsigned_null mediumint unsigned null,
smallint_not_null smallint not null,
smallint_null smallint null,
smallint_unsigned_not_null smallint unsigned not null,
smallint_unsigned_null smallint unsigned null,
text_not_null text not null,
text_null text null,
time_not_null
time
not null,
time_null
time
null,
tinyint_not_null tinyint not null,
tinyint_null tinyint null,
tinyint_unsigned_not_null tinyint unsigned not null,
tinyint_unsigned_null tinyint unsigned null,
varchar_not_null varchar(64) not null,
varchar_null varchar(64) null
);
( run in 0.356 second using v1.01-cache-2.11-cpan-3cd7ad12f66 )