Skip Menu |

This queue is for tickets about the Maypole CPAN distribution.

Report information
The Basics
Id: 12923
Status: resolved
Priority: 0/
Queue: Maypole

People
Owner: TEEJAY [...] cpan.org
Requestors: dave [...] riverside-cms.co.uk
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: (no value)
Fixed in: 2.11



Subject: better inheritance in Maypole::Application
Mp::App 2.09 pushes the frontend class onto Mp::App::ISA, and then pushes Mp::App onto the application's @ISA. It does this because the code to determine the frontend class runs outside the import method, and therefore doesn't know the calling class. The patches I've already submitted move the frontend code to the import method, so the application class is known, and the frontend can be inherited directly by the app and not via Mp::App. Instead of pushing @plugin_modules, $class you can push @plugin_modules, $frontend. I'm writing a module to generate multiple Maypole apps on the fly. The current arrangement results in the frontend being added to @Mp::App::ISA once for every app - which could be hundreds of times.
[guest - Sun May 22 17:34:46 2005]: Show quoted text
> Mp::App 2.09 pushes the frontend class onto Mp::App::ISA, and then > pushes Mp::App onto the application's @ISA. It does this because > the code to determine the frontend class runs outside the import > method, and therefore doesn't know the calling class. > > The patches I've already submitted move the frontend code to the > import method, so the application class is known, and the frontend > can be inherited directly by the app and not via Mp::App. Instead > of pushing @plugin_modules, $class you can push @plugin_modules, > $frontend. > > I'm writing a module to generate multiple Maypole apps on the fly. The > current arrangement results in the frontend being added to > @Mp::App::ISA once for every app - which could be hundreds of > times.
Forgot to say this would break things if I had two separate virtual apps being set up on the fly, based on different frontends. Mp::App would end up inheriting from multiple frontends.
From: TeeJay
[guest - Sun May 22 17:40:25 2005]: Show quoted text
> [guest - Sun May 22 17:34:46 2005]: >
> > Mp::App 2.09 pushes the frontend class onto Mp::App::ISA, and then > > pushes Mp::App onto the application's @ISA. It does this because > > the code to determine the frontend class runs outside the import > > method, and therefore doesn't know the calling class. > > > > The patches I've already submitted move the frontend code to the > > import method, so the application class is known, and the
> frontend
> > can be inherited directly by the app and not via Mp::App. Instead > > of pushing @plugin_modules, $class you can push @plugin_modules, > > $frontend. > > > > I'm writing a module to generate multiple Maypole apps on the fly.
> The
> > current arrangement results in the frontend being added to > > @Mp::App::ISA once for every app - which could be hundreds of > > times.
> > > Forgot to say this would break things if I had two separate virtual > apps > being set up on the fly, based on different frontends. Mp::App would > end > up inheriting from multiple frontends. >
Flagged for 2.11
Applied in revision 376.