From: <me...@st...> - 2005-08-07 16:07:09
|
>>>>> "A" =3D=3D A Pagaltzis <pag...@gm...> writes: A> and hi Randall in particular. I have a working version of this, A> largely derived from ::Hidden for consistency in slot names. (It A> also let me copy 95% of the POD verbatim. Writing documentation A> is easy when it=E2=80=99s already done for you. *g*) Cool. A> It has a somewhat distinct personality in that it wants an A> explicit list of page names to validate (I=E2=80=99d rather prefer if A> ::Hidden worked the same way =E2=80=93 I like my code hardwired for =E2= =80=9Cno A> surprises ever possible=E2=80=9D) and works slightly differently in a few A> minor aspects. But by and large a well-written ::Hidden app would A> translate to a ::PathInfo one with almost no changes. Right now, my thoughts are that Hidden is actually doing two different things: 1) Figuring out the state (from hidden fields, as named) 2) Mapping the state to classes (autoloading based on a prefix for the clas= s) I'd like to refactor Hidden so that the pieces are separate mixins, so that the state tracking and the state-to-class mapping policy are independently reusable. Your code would then provide an alternative for each of those (state via URL, mapping via explicit table). As usual, my time is limited, but if someone wants to go into more thoughts on that, I'm willing to discuss it. I'm also looking at moving my sources to SF so that I can have more committers. A> I=E2=80=99ve also added a little twist so that =E2=80=9Cfoo.cgi/bar/42= =E2=80=9D will A> dispatch to =E2=80=9CMy::App::bar=E2=80=9D and set the =E2=80=9Cpage_id= =E2=80=9D slot to 42 in A> the process. (The slot defaults to undef.) This is very handy for A> cruft-free, clean URLs. Nice. A> Now my question is: should I put this on CPAN, or should I leave A> the space to an =E2=80=9Cofficial=E2=80=9D version? Or should I just pos= t it A> here, maybe? If I put this on CPAN myself, what should I put in A> the AUTHOR and COPYRIGHT & LICENSE sections of the POD? There is A> so little code in there that the notion of authorship is a bit A> ridiculous either way, but I also copied several pages of POD A> that I can hardly claim authorship of. Well, if we create the SF archive, this can stay one or two distros. I'd actually like to see separate distros like: CGI::Prototype CGI::Prototype::Hidden (mixin for param->state) CGI::Prototype::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 determiners, and CGI::Prototype::DoState::$mumble is for all state mappers. I hate those names, but I hope the idea is clear. --=20 Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 <me...@st...> <URL:http://www.stonehenge.com/merlyn/> Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl trainin= g! |