Hi,

I applaud you for trying to think through this stuff, it is kind of difficult to just jump into stuff like this

Now I feel like like these SCRIPT_NAME and PATH_INFO dating back into past century are awkward. My proposal is to rename this stuff completely:

Don't rename, add new names?

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

script_name seems like route_name, path_info might be route_raw ... but does a user need these? Does a user only need https://metacpan.org/pod/Mojolicious::Controller#url_for?

 

 get + post is cute, but looks like it should be get_post -- but you probably heard about that already :)

 

What is causing surprise and awkwardness here?

Separation of concerns (everything, difficult to just jump in)?

For example ->suffix makes no sense

While ->route_suffix sounds like a better name, the purpose of knowing a suffix is a mystery -- why would a new user of your module need that?

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

 

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


In reply to Re: Better names for SCRIPT_NAME/PATH_INFO in a web framework? by beech
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.