On 7/14/05, Thilo Planz <suppressed> wrote:
>
> >> sub first : StartRunmode {
> >> my $self = shift;
> >> return $self->forward('second');
> >> }
> >
> >
> > The current AutoRunmode plugin does not support "StartRunmode", but
> > since you really seem to like that feature, I guess I should try to
> > implement it ...
>
> I have put something together now.
Great!
> It works by basically creating a method "start_mode" in your CGI::App
> subclass that will always return just one name (the name of the
> StartRunmode).
>
> This means that it will not be possible to mix the class-based
> :StartRunmode with the traditional instance-based
> $app->start_mode("new_name").
> You will not be able to change the start_mode from an instance script.
I think that is acceptable. I don't think it would be advisable to
mix the styles in a single class. However, I think it is important
that it work with a base-class that may use the standard CGI::App
system, and a sub-class that uses the attributes method. From the
sounds of it, it should work.
> Barring objections, I will upload the module to CPAN over the weekend
> (the other change is that the method attributes are now case-insensitive).
>From what you have described, it sounds like a good concesion to me,
so I would be in favour of uploading the new version.
I have another question for you about the plugin. I noticed in the
current version, if I put the use
CGI::Application::Plugin::AutoRunmode in my base class, I don't
automatically have the ability to use the Runmode attributes in my
subclasses, and I have to add the 'use' statement again. My guess is
that this is not a problem with your code, but the result of the way
perl implements attributes. I am just looking for confirmation on
what I am seeing?
Cheers,
Cees
---------------------------------------------------------------------
Web Archive: http://www.mail-archive.com/suppressed/
http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2
To unsubscribe, e-mail: suppressed
For additional commands, e-mail: suppressed
Mail converted by mhonarc 2.6.15
This archive provided courtesy of JSW4.NET, Internet Hosting Services for Small Business.