Terrence Brannon metaperl.com> writes:
>
> package Message::Primer;
>
> use CGI::Prototype;
>
> __PACKAGE__->reflect->activate;
Ugh. That should be __PACKAGE__->activate. activate is protocol,
not meta-protocol!
---
SF email is sponsor
w(test3 test4 test5)],
'members email are OK';
}
So, I'm poking at the application through the "web", then
immediately accessing the database through Class::DBI calls
to ensure that the web changes are reflected correctly.
Then I use these with Devel::
::Prototype::Cookbook.
For example, my top level class was GC::App... so I created GC/ttlib
to hold all my INCLUDE'd files, because they'd sit alongside the rest
of my app, but not get in the way of the files in GC/App/*.tt, which
I reserved purely for state-based pages.
--
Randal L. S
lose to the metal. CGI::Prototype::Hidden (and the upcoming
"when I get a few more tuits" CGI::Prototype::Pathinfo) are a much
better starting framework for a "real" app.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge
.start_html("-title", self.title) %]
This defines the default titlebar related to the state name.
And yet, any specific state can provide
sub title { "Acquiring Remote Latinum" }
to override that.
"This (and other) tips will be found in the forthcoming
CGI::Pro
m within a template file, "self" is a named class, if you're using
CGI::Prototype::Hidden. I'm not sure how you're using the file above,
but I bet "self" is not a named class any more.
LD> Ahh, yep - that works. Cheers.
Good.
--
Randal L. Schwartz - Stoneheng
rlyn/LinuxMag/col71.html>
<http://www.stonehenge.com/merlyn/LinuxMag/col72.html>
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Sto
ses.
I've talked about it. Haven't gotten to it.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTrain
a just
fine.
Then in any thing that needed it:
sub randomfunc {
my $self = shift;
my $per_hit = $self->per_hit;
$per_hit->{foo} = "bar";
}
In this case, you just need to keep your keys of $per_hit clean,
but you had to do that with slots anyway. :) This'll also be faster
t
>>>>> "Randal" == Randal L Schwartz writes:
Randal> sub My::App::control_enter {
Randal> my $self = shift;
Randal> $self->reflect->addSlot(per_hit => {});
Randal> }
That should be My::App::app_enter { }
control_enter would cause it to get
snippets file. I hope to have a
CGIP::Cookbook in a future release, or maybe we'll just take turns
updating CGIP::FAQ.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing,
quot;Login" %]Login![% END %]
Note that this requires config_state_param to not begin with an
underscore or dot, thanks to some odd interactions with TT's
restrictions.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
>>>>> "Randal" == Randal L Schwartz writes:
Randal> Then I can say:
Randal> [% WRAPPER link state = "Login" %]Login![% END %]
No, that's not right. I have to do something with a href =.
N
type::Autoload (mixin for state->class via autoload)
CGI::Prototype::Pathinfo (mixin for info->state)
CGI::Prototype::$mumble (mixin for state->class via $mumble)
etc. Or maybe even go down one layer... where
CGI::Prototype::GetState::$mumble is for all state determiner
)
And no, I have the idea to do it, but not the immediate motivation or
time. :( Glad to see someone else is finding the framework useful.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consultin
find Randal Schwartz in
Terrence> the sf.net user list and someone has the name merlyn
Terrence> already.
I'm "sourcemerlyn" there.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Pe
avorite), but any templator
can be chosen insteasd".
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.S
ut making the changes directly
there.
Let's settle on the naming first... :)
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTr
TWrapper',
);
## other subs for My::App;
1;
And in fact, the current CGI::Prototype::Hidden would be a pm with
just this in it, to be backward compatible.
Other mixins:
CGI::Prototype::State::Pathinfo (yours)
CGI::Prototype::Mapper::StrictLookup (yours)
CGI::Proto
e_to_page or shortname on pages from
Andrew> either project. Does this sound like a good idea, or can you
Andrew> suggest a better way to share pages and functionality between
Andrew> applications?
This would be handled with a local-policy ::Mapper::*, as I just described
in my previ
keep the core CGIP as lean as
possible.
Consider also something like Slashdot, where the templates are loaded
from a database... I can also see that here. Maybe state-to-class is
dynamic based on current user ID or other security parameter? Really,
there's policy there, and it's bes
>>>>> "Randal" == Randal L Schwartz writes:
Randal> Consider also something like Slashdot, where the templates are loaded
Randal> from a database... I can also see that here. Maybe state-to-class is
Randal> dynamic based on current user ID or other security p
ocumentation. Your protoapp
doesn't exist, that's why it's broken. It's not One, because Two
doesn't inherit from One.
You need your app, from which your pages inherit. Then the
display method gets added into the right place.
--
Randal L. Schwartz - Stonehenge Consulting Ser
lain to me what isn't good about that. No discussion
on that after my pitch. :(
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, et
gt; for a moment…
I've been having trouble for the past 24 hours with my existing emacs
session with regard to email. I have rebooted emacs... let's see if
this helps.
I run "screen emacs", connecting to the same emacs session for up to
four or five months at a time.
--
Ran
e of content.
A> I found responsibilities are actually separated more cleanly this
A> way.
Correct. Not knowing (really) what would happen when you say
->render, the best thing is to leave the content-type to the renderer,
and if you wanted to push some part of that back to contro
with each operation
able to "stay here" to redo a step, or "go somewhere else" to continue
in the interaction.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting,
r a better "tiny" app, see my Linux Magazine articles (google
site:stonehenge.com CGI::Prototype for the location).
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting,
enough to simply list them literally:
use My::App;
use My::App::PageOne;
use My::App::PageTwo;
etc
You can probably automate that if you wanted. I'm sure you can come
up with a BEGIN block that reads the directory and loads all the
plugins.
--
Randal L. Schwar
>
(http://httpd.apache.org/docs/1.3/misc/FAQ-F.html#premature-script-headers)
benh> Thinking that it's an apache issue.
Whenever you get an error like that, you need to look at the
error log. What does the error log say?
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc.
It's very NOT COOL for you to take private email and send it back to
the list.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.St
sing something big).
Sorry, I misoperated my mailreader. I had wanted it to be a private
message, but obviously, it's archived at sf.net, so my mistake,
I'm sorry.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Perl/Uni
oject that will plug
prototype.js (and probably scriptaliscious) into a CGIP framework.
Once I have this in place, the oft-rumored "CGIP cookbook" will show
how to make web 2.0 apps easily with CGIP. Wheee.
More soon.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +
sion
A> in-place.
A> Should we do this for the CGIP repository?
Absolutely. If you have a commit bit, go ahead. Otherwise, when I get
to it (hopefully this weekend), I'll do it myself.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www
e onsite in Burbank CA, and all the conferences
I regularly attend. I hope to get back to CGIP sometime soon with some
updates that I've realized as I adapt the code for my clients.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
end the user to any page I want.
That's a great idea. Might be enough for me to incorporate and get a new
release out as well (I've got a couple of minor buggy things that I'm saving
up too).
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://ww
mixed-in" version in the middle of your inheritance
ladder, rather than hanging out on a second parent.
It's one of the weakest parts of the Class::Prototyped design, unfortunately,
and having chosen that for CGIP, I'm sorta stuck with it.
--
Randal L. Schwartz - Stonehenge Consult
the basics. Don't go nutty.
Add things as you see fit when they are common to *all* apps.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<[EMAIL PROTECTED]> http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy,
>>>>> "Terrence" == Terrence Brannon writes:
Terrence> I'm a github fan and would like to put up a repo for CGIP ASAP.
You can just fork mine. CGIP is already on github.
http://github.com/RandalSchwartz/perl-module-cgi-prototype/tree/master
--
Randal L.
GI::Prototype::Moose;
Terrence> use Moose;
Terrence> extends 'Class::Prototyped';
Not really. The prototype stuff of Moose is where you want to start, and it
has a different interface. If you just pulled in Class::Prototyped, you'd
have a lot of potential conflicts, especially
ports
prototype-inheritance objects. I have customers that are making use of the
Class::Prototyped features that are not classical class-instance structures,
so any "replacement" of CGIP with something new must be carefully considered.
--
Randal L. Schwartz - Stonehenge Consulting Services, In
of what CGIP already does, including prototype inheritance. Feel free
to release it as CGI::Moose or something.
--
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See
42 matches
Mail list logo