Hi,

Thank you.

Have you seen https://metacpan.org/pod/Plack::Request#path_info/script_name?

After re-reading the Plack::Request docs, I'm struggling to understand why did I pick such misleading names in the first place. What I'm talking about here has nothing to do with peeking at low level/raw stuff.

So in neaf, the current convention is as follows:

This is arguably horrible and misleading. I would like to get rid of the middle part as it's superseded by the last one, and come up with sane names for (1) the part of path that matched current route and (2) the capture groups found in the remainder of the path. Other frameworks use param aliases for (2), except for sinatra (ruby) that calls it splat. The param approach doesn't play nicely with my "regexp filters everywhere" approach.

get_post

Could as well be put + patch. It's only delete that spoils everything and I have to maintain an any variant anyway.

Does route return a route object? Something like Routes::Tiny::Match?

I was thinking that route() should be a string, just the part of the path mathing current route. Apparently it's not the case with Dancer, so it's a misleading name after all. And I was also thinking about endpoint() method for providing the route details object, but it's not even in TODO yet.

route_suffix

Nice, although maybe a bit long.

I think you're too close to your code, and I'm too far far far away :)

This is why I have to ask. I need an outside view.


In reply to Re^2: Better names for SCRIPT_NAME/PATH_INFO in a web framework? by Dallaylaen
in thread Better names for SCRIPT_NAME/PATH_INFO in a web framework? by Dallaylaen

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.