auto configuration

auto configuration

am 10.10.2008 09:40:20 von valerio crini

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#Aut o_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&descr iption=bla
+bla+bla&debug_response=OK&service_code=acl-service2&command =book'
);
ok( t_cmp( $content2, '' ) );

I've this response

# received:
#
# 404 Not Found
#
#

Not Found


#

The requested URL /TestResponse__TestHandler2 was not found on this
server.


#

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

am 12.10.2008 16:56:38 von Adam Prime

Quoting valerio crini :

> 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#Aut o_Configuratio=
n
>
> 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 =3D GET_BODY(
> '/TestResponse__TestHandler2?provider=3D1012&uid=3D%
> 2B12233051141&app_id=3D1223305114-245452&channel=3Dchannel&d escription=3Db=
la
> +bla+bla&debug_response=3DOK&service_code=3Dacl-service2&com mand=3Dbook'
> );
> ok( t_cmp( $content2, '' ) );
>
> I've this response
>
> # received:
> #
> # 404 Not Found
> #
> #

Not Found


> #

The requested URL /TestResponse__TestHandler2 was not found on this
> server.


> #
>
> 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 =20
whole in the documentation which is how exactly Apache::Test finds the =20
packages that it needs to create Location blocks for. I tried a =20
couple of things (including them directly in the .t file, in a plain =20
path in the t/ directory) but they didn't work.

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

Adam

Re: auto configuration

am 13.10.2008 10:33:20 von valerio crini

> > 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 ...