On 10/11/05, Aaron Trevena <[EMAIL PROTECTED]> wrote:
> Hi dave, david, peter
>
> has there been any progress on this?


No . We were waiting for you. :)  Dave has written a nice, robust
plugin with docs that  has more than there  is time to put in core
right now.  For core Maypole in 2.11 or 2.12 (depending on what
depends on this) I think  a simple make_path that does the opposite of
parse_path is desirable. And to that end  what a Dave says here
(admirably articulate I might add) regarding a shared path template is
the hard part :

> I'd like to see this in core, because then we can document path making
> and URL parsing in the same place, and emphasize the advantages of
> using these methods for all path manipulation. Also, there's the
> potential for make_path and parse_path to both use a shared path
> template, so the whole path scheme could be changed at a single point.

The method name and docs are easy:

=head2 make_path

    $path = $r->make_path($table_or_template, $action_or_template,
$args, $query)

This does the opposite of parse_path -- makes a path to be used in a
uri out of the arguments. All args are scalars except for $query which
is a hash ref.  The arguments are constructed into a path according to
the <C>shared_path_template.  *NOTE*  To override the form of paths in
your application override the <C>shared_path_template.

=cut

sub make_path {
     my ($r, @args);
     return $r->shared_path_template('make', @args);
}

=head2 shared_path_template

  shared_path_template('parse', $path);
  shared_path_template('make',@args);

This determines the format of uris in your application. Override this
to set that
format and not parse_path or make_path.

=cut

sub shared_path_template {
       my ($what, @args)
=cut
sub shared_path_template {

Perhaps we can do that for 2.12. The templates would need changing, as
would the references scattered around the docs (the code of flox, for
example?). More than I want to take on right now.

Cheers, Dave


> I'm looking through the outstanding bugs in rt.cpan.org we still don't
> have link() working correctly for search requests with =s in fields.
>
> I'll have to come back to that based on the results of the work
> mentioned in this thread.
>
> cheers,
>
> A.
>
>
> -------------------------------------------------------
> This SF.Net email is sponsored by:
> Power Architecture Resource Center: Free content, downloads, discussions,
> and more. http://solutions.newsforge.com/ibmarch.tmpl
> _______________________________________________
> Maypole-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/maypole-users
>


--
pjs


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Maypole-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/maypole-users

Reply via email to