* Terrence Brannon <[EMAIL PROTECTED]> [2005-09-09 21:05]:
> I think the resource id should be a reference to an anonymous
> array
> [ 283188, 43 ]
Then split the string into an array and save it in a slot in
`app_enter`?
It might be a good thing if this were the default behaviour, but
I have no
"A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> * Terrence Brannon <[EMAIL PROTECTED]> [2005-09-09 14:30]:
>> Thing is, can't a path have more than just 2 components? There
>> is no reason it can't have much more is there?
>
> Sure. You can include `'thread/post'` in your valid pages and
> invoke `fo
* Terrence Brannon <[EMAIL PROTECTED]> [2005-09-09 14:30]:
> Thing is, can't a path have more than just 2 components? There
> is no reason it can't have much more is there?
Sure. You can include `'thread/post'` in your valid pages and
invoke `forum.cgi/thread/post/283188/43`, in which case the
obj
>From Aristotle's CGIP::PathInfo, we have this:
sub prototype_enter {
my $self = shift;
$self->SUPER::prototype_enter();
my ( $resource, $id ) = $self->parse_path( $self->CGI->path_info() );
$self->reflect->addSlot( resource_type => $resource, resource_id => $id
Here is my unified diff of the attachment you emailed earlier. I like
this module a lot and will be retooling my simple guestbook app to use
it. This is our first step towards a CGI::Prototype on Rails type
thing. Maybe we could publish a Perl Review article if everything is
clean and easy to foll
* Randal L. Schwartz [2005-08-15 20:00]:
> To further this, let's say I had a $big_client that needs to
> show a login page if the user isn't logged in, regardless of
> whatever "state" the ->get_state returns. They can override
> ->get_class to simply return the login page if not logged in,
> re
* Randal L. Schwartz [2005-08-15 19:50]:
> Ewww. I'd never use code like that.
At the HTTP level, it is cleaner design. Nobody on the other side
of the app interface will care whether it requires uglier
scaffolding under the hood, nor should they. Thus, neither do I.
> Yeah, hadn't envisioned t
> "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 parameter? Really,
Randal> there's po
> "A" == A Pagaltzis <[EMAIL PROTECTED]> writes:
A> Looks sensible enough, but the mapper must be more abstract than
A> you propose. Abstraction on the level you have in mind is not
A> tenable because ::State::Pathinfo needs knowledge from
A> ::Mapper::StrictLookup to be able to tell that
A>
* Randal L. Schwartz [2005-08-15 18:40]:
> Then, I wanna refactor the current Hidden into its pieces:
>
> a mixin for ->get_state (call it CGI::Prototype::State::Hidden)
> - uses the hidden param to get a state name, or a default state
> a mixin for ->get_class (call it CGI::Prototype::Mapper::
> "A" == A Pagaltzis <[EMAIL PROTECTED]> writes:
A> could you please give an answer to these questions?
See, that's the problem when I try to take a weekend off, like normal
people. :)
First, I hate ::Simple. On any module. If the interface was so
complicated that it needed a "simple" thin
Randal,
* A. Pagaltzis <[EMAIL PROTECTED]> [2005-08-11 17:40]:
> I was hoping to start refactoring ::Hidden into bits that can
> be reused in ::PathInfo and others and those which can’t.
> ::PathInfo could then be separate or be part of the distro, but
> that’s a different issue.
>
> Do you agree
* Randal L. Schwartz [2005-08-11 17:20]:
> If you are thinking that the release currently called
> CGI-Prototype should be altered, we can talk about making the
> changes directly there.
Well, kinda; I was hoping to start refactoring ::Hidden into bits
that can be reused in ::PathInfo and others
> "A" == A Pagaltzis <[EMAIL PROTECTED]> writes:
A> Ok, so I’d like to dive in there and get the bits moving right
A> now, but I don’t want to step on any toes, particularly with
A> architectural (more or less) decisions like this one. How are we
A> going to be handling issues like this one?
* A. Pagaltzis <[EMAIL PROTECTED]> [2005-08-11 01:40]:
> So I think that rather than attempting to separate state
> deduction and mapping entirely, it would be enough to factor
> out the mapping into a common base and reuse that. As always,
> loads of slots make the job pretty smooth.
Ok, so I’d l
* Randal L. Schwartz [2005-08-07 18:15]:
> Cool.
Ok, great, then I’ll keep working on it.
> 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 pre
> "A" == A Pagaltzis <[EMAIL PROTECTED]> writes:
A> I just don’t want to step on Randalls’s toes in case he’s already
A> done this – but I also have very specific ideas about how to do
A> this and a CPAN directory longing for something to put in it. :-)
And no, I have the idea to do it, but n
> "A" == A Pagaltzis <[EMAIL PROTECTED]> 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’s already done for you.
"A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> * Terrence Brannon <[EMAIL PROTECTED]> [2005-08-03 20:15]:
>> If you put it on CPAN and it is based on hidden, then perhaps
>> it should be CGI::Prototype::Hidden::PathInfo?
>>
>> I never could figure out Hidden, I use the vanilla
>> CGI::Prototype for
* Terrence Brannon <[EMAIL PROTECTED]> [2005-08-03 20:15]:
> If you put it on CPAN and it is based on hidden, then perhaps
> it should be CGI::Prototype::Hidden::PathInfo?
>
> I never could figure out Hidden, I use the vanilla
> CGI::Prototype for everything.
Hmm, I found it extremely straightfo
"A. Pagaltzis" <[EMAIL PROTECTED]> writes:
> I have a working version of this,
> largely derived from ::Hidden for consistency in slot names.
> Now my question is: should I put this on CPAN, or should I leave
> the space to an âofficialâ version?
If you put it on CPAN and it is based on hid
Hi all,
and hi Randall in particular. I have a working version of this,
largely derived from ::Hidden for consistency in slot names. (It
also let me copy 95% of the POD verbatim. Writing documentation
is easy when it’s already done for you. *g*)
It has a somewhat distinct personality in that it w
22 matches
Mail list logo