Skip Menu |

This queue is for tickets about the Handel CPAN distribution.

Report information
The Basics
Id: 19707
Status: resolved
Priority: 0/
Queue: Handel

People
Owner: claco [...] cpan.org
Requestors: tkp [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Important
Broken in: 0.99_01
Fixed in: (no value)



Subject: AxKit Exception error
In Handel Exception, you test to see if we have AxKit and attempt to alter @ISA if we do. It doesn't work, and I think the reason is to do with the way your trying to alter @ISA... I got it to work by changing it to this: *** Exception.pm Mon Jun 5 14:01:54 2006 --- Exception-NEW.pm Mon Jun 5 14:01:44 2006 *************** *** 8,14 **** use Handel::L10N qw(translate); eval 'require Apache::AxKit::Exception'; if (!$@) { ! push @__PACKAGE__::ISA, 'Apache::AxKit::Exception'; }; }; --- 8,15 ---- use Handel::L10N qw(translate); eval 'require Apache::AxKit::Exception'; if (!$@) { ! no strict; ! push @ISA, 'Apache::AxKit::Exception'; }; };
On Mon Jun 05 09:03:11 2006, guest wrote: Show quoted text
> In Handel Exception, you test to see if we have AxKit and attempt to > alter @ISA if we do. > > It doesn't work, and I think the reason is to do with the way your > trying to alter @ISA... I got it to work by changing it to this: > > *** Exception.pm Mon Jun 5 14:01:54 2006 > --- Exception-NEW.pm Mon Jun 5 14:01:44 2006 > *************** > *** 8,14 **** > use Handel::L10N qw(translate); > eval 'require Apache::AxKit::Exception'; > if (!$@) { > ! push @__PACKAGE__::ISA, 'Apache::AxKit::Exception'; > }; > }; > > --- 8,15 ---- > use Handel::L10N qw(translate); > eval 'require Apache::AxKit::Exception'; > if (!$@) { > ! no strict; > ! push @ISA, 'Apache::AxKit::Exception'; > }; > };
Just for the sake asking so, do your t/xsp_* tests pass before applying this patch? Could you put together a simple XSP based test case for this? -=Chris
On Mon Jun 05 09:03:11 2006, guest wrote: Show quoted text
> In Handel Exception, you test to see if we have AxKit and attempt to > alter @ISA if we do. > > It doesn't work, and I think the reason is to do with the way your > trying to alter @ISA... I got it to work by changing it to this: > > *** Exception.pm Mon Jun 5 14:01:54 2006 > --- Exception-NEW.pm Mon Jun 5 14:01:44 2006 > *************** > *** 8,14 **** > use Handel::L10N qw(translate); > eval 'require Apache::AxKit::Exception'; > if (!$@) { > ! push @__PACKAGE__::ISA, 'Apache::AxKit::Exception'; > }; > }; > > --- 8,15 ---- > use Handel::L10N qw(translate); > eval 'require Apache::AxKit::Exception'; > if (!$@) { > ! no strict; > ! push @ISA, 'Apache::AxKit::Exception'; > }; > };
Just so I can say I asked, what version of AxKit are you running?
Subject: Re: [rt.cpan.org #19707] AxKit Exception error
Date: Mon, 5 Jun 2006 14:28:22 +0100
To: bug-Handel [...] rt.cpan.org
From: Tom Kirkpatrick <tom [...] kirkdesigns.co.uk>
1.62 On 5 Jun 2006, at 14:21, via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=19707 > > > On Mon Jun 05 09:03:11 2006, guest wrote:
>> In Handel Exception, you test to see if we have AxKit and attempt to >> alter @ISA if we do. >> >> It doesn't work, and I think the reason is to do with the way your >> trying to alter @ISA... I got it to work by changing it to this: >> >> *** Exception.pm Mon Jun 5 14:01:54 2006 >> --- Exception-NEW.pm Mon Jun 5 14:01:44 2006 >> *************** >> *** 8,14 **** >> use Handel::L10N qw(translate); >> eval 'require Apache::AxKit::Exception'; >> if (!$@) { >> ! push @__PACKAGE__::ISA, 'Apache::AxKit::Exception'; >> }; >> }; >> >> --- 8,15 ---- >> use Handel::L10N qw(translate); >> eval 'require Apache::AxKit::Exception'; >> if (!$@) { >> ! no strict; >> ! push @ISA, 'Apache::AxKit::Exception'; >> }; >> };
> > > Just so I can say I asked, what version of AxKit are you running?
Subject: Re: [rt.cpan.org #19707] AxKit Exception error
Date: Mon, 5 Jun 2006 14:37:09 +0100
To: bug-Handel [...] rt.cpan.org
From: Tom Kirkpatrick <tom [...] kirkdesigns.co.uk>
Unfortunately I don't have Apache::Test installed so those tests did not run and I can't get it installed here (at work) in a resonable timescale. I'll have a go at home later if I get a chance. But... It definitely does not work the way it's currently coded... @ISA never gets changed, and AxKit doesn't recognise the exceptions that get thrown. On another note... I'm having a little trouble setting schema_instance(). If I set it from my controller, it's fine.. but if I try to set it in one of my subclasses My::Cart, it doesn't seem to actually get set and Handle complains hat no connection information has been set. __PACKAGE__->schema_instance(My->db->schema_instance); is that a valid place to try and set? I can't see why it wouldn't be. On 5 Jun 2006, at 14:08, Guest via RT wrote: Show quoted text
> > <URL: http://rt.cpan.org/Ticket/Display.html?id=19707 > > > On Mon Jun 05 09:03:11 2006, guest wrote:
>> In Handel Exception, you test to see if we have AxKit and attempt to >> alter @ISA if we do. >> >> It doesn't work, and I think the reason is to do with the way your >> trying to alter @ISA... I got it to work by changing it to this: >> >> *** Exception.pm Mon Jun 5 14:01:54 2006 >> --- Exception-NEW.pm Mon Jun 5 14:01:44 2006 >> *************** >> *** 8,14 **** >> use Handel::L10N qw(translate); >> eval 'require Apache::AxKit::Exception'; >> if (!$@) { >> ! push @__PACKAGE__::ISA, 'Apache::AxKit::Exception'; >> }; >> }; >> >> --- 8,15 ---- >> use Handel::L10N qw(translate); >> eval 'require Apache::AxKit::Exception'; >> if (!$@) { >> ! no strict; >> ! push @ISA, 'Apache::AxKit::Exception'; >> }; >> };
> > > Just for the sake asking so, do your t/xsp_* tests pass before > applying > this patch? > > Could you put together a simple XSP based test case for this? > > -=Chris
Show quoted text
> On another note... > I'm having a little trouble setting schema_instance(). If I set it > from my controller, it's fine.. but if I try to set it in one of my > subclasses My::Cart, it doesn't seem to actually get set and Handle > complains hat no connection information has been set. > > __PACKAGE__->schema_instance(My->db->schema_instance); > > is that a valid place to try and set? I can't see why it wouldn't be.
*cough*seperate ticket*cough* :-) P.S. I'm not sure. I can't say that I've tried using a schema instance that is set via schema_instance($instance) yet. At first glance, I know when schema_instance creates a schema instance, it does a lot of magic to it before returning it. Setting a schema_instance doesn't do that magic, yet. I need to factor that magic out, and also have ot work on the instance, and not molest the schema classes themselves. And since you mention 'controller', I'll assume you mean a Catalyst controller. The Catalyst stuffs hasn't been touched really yet, so all bets are off ATM.
This should be fixed in 0.99_03