You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modperl@perl.apache.org by valerio crini <va...@staff.dada.net> on 2008/10/10 09:40:20 UTC

auto configuration

Hallo,
I'm trying to use modperl2's feature 'auto configuration' but without
success.

Manual says in 

http://perl.apache.org/docs/general/testing/testing.html#Auto_Configuration

that in order to add automatically new items to location is necessary
adding a package called

TestResponse::'packagename'

that magically will be converted in a 

/TestResponse__'packagename' entry in apache configuration

I've tried create such package (simple renaming existing and working
package) with name 'TestResponse::TestHandler2'
but when i issue following command:

my $content2 = GET_BODY(
'/TestResponse__TestHandler2?provider=1012&uid=%
2B12233051141&app_id=1223305114-245452&channel=channel&description=bla
+bla+bla&debug_response=OK&service_code=acl-service2&command=book'
);
ok( t_cmp( $content2, '' ) );

I've this response

# received: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
# <html><head>
# <title>404 Not Found</title>
# </head><body>
# <h1>Not Found</h1>
# <p>The requested URL /TestResponse__TestHandler2 was not found on this
server.</p>
# </body></html>

I think i'm failing in something but i can't understard where my error
is, googling I'didn't found any clue.
May some sage help me?




Re: auto configuration

Posted by valerio crini <va...@staff.dada.net>.
> > I think i'm failing in something but i can't understard where my error
> > is, googling I'didn't found any clue.
> > May some sage help me?
> >
> 
> I just had a look at this stuff, and it seems like there is one big  
> whole in the documentation which is how exactly Apache::Test finds the  
> packages that it needs to create Location blocks for.  I tried a  
> couple of things (including them directly in the .t file, in a plain  
> path in the t/ directory) but they didn't work.
> 
> Perhaps Fred or Geoff, or someone else with a little more experience  
> with Apache::Test can shed some light onto this feature.
> 
> Adam
> 
You've just descripted exalty where my problem is!
Actually I image that all the problem is where placing those packages
that should create the "dynamic" configuration. In order i tried in:
1) t/ directory
2) inside the text itself 
3) in a package directory that followed package convention
( TestResponse::TestHandler2 i put in TestResponse/TestHandler2 path)
4) in t/conf 
Unfortunately those weren't successful ideas ...


Re: auto configuration

Posted by ad...@utoronto.ca.
Quoting valerio crini <va...@staff.dada.net>:

> Hallo,
> I'm trying to use modperl2's feature 'auto configuration' but without
> success.
>
> Manual says in
>
> http://perl.apache.org/docs/general/testing/testing.html#Auto_Configuration
>
> that in order to add automatically new items to location is necessary
> adding a package called
>
> TestResponse::'packagename'
>
> that magically will be converted in a
>
> /TestResponse__'packagename' entry in apache configuration
>
> I've tried create such package (simple renaming existing and working
> package) with name 'TestResponse::TestHandler2'
> but when i issue following command:
>
> my $content2 = GET_BODY(
> '/TestResponse__TestHandler2?provider=1012&uid=%
> 2B12233051141&app_id=1223305114-245452&channel=channel&description=bla
> +bla+bla&debug_response=OK&service_code=acl-service2&command=book'
> );
> ok( t_cmp( $content2, '' ) );
>
> I've this response
>
> # received: <!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">
> # <html><head>
> # <title>404 Not Found</title>
> # </head><body>
> # <h1>Not Found</h1>
> # <p>The requested URL /TestResponse__TestHandler2 was not found on this
> server.</p>
> # </body></html>
>
> I think i'm failing in something but i can't understard where my error
> is, googling I'didn't found any clue.
> May some sage help me?
>

I just had a look at this stuff, and it seems like there is one big  
whole in the documentation which is how exactly Apache::Test finds the  
packages that it needs to create Location blocks for.  I tried a  
couple of things (including them directly in the .t file, in a plain  
path in the t/ directory) but they didn't work.

Perhaps Fred or Geoff, or someone else with a little more experience  
with Apache::Test can shed some light onto this feature.

Adam