On 12/12/05, Michael Graham <[EMAIL PROTECTED]> wrote: > Well, in 'admin/:app/:rm', what does ':app' do, since 'app' is already > specified in the results?
Good point. A hasty cut and paste is to blame. > In particular, are you suggesting that the > following would still match? > > URL Module Run Mode > --- ------ -------- > /admin/users/edit MySite::Admin::Users edit > /admin/users/add MySite::Admin::Users add > /admin/users MySite::Admin::Users > > If so, then you seem to be suggesting that whatever ':app' matches in > the URL should be combined in some intelligent way with the value of > 'app' in the results. That seems too magical to me. For instance, how > is it obvious that you want 'MySite::Admin::Users' and not > 'Users::MySite::Admin'? Prefix is much clearer. > I made a mistake in my example. Prefix is a nice short hand when all modules share the similar names, but it complicates matters when you are dealing with modules from completely different namespaces. This feels like a fringe case to me. > IMO, 'app' should only be allowed in the results if ':app' does not appear in > the rule. Similarly for 'rm' and ':rm'. Agreed. > Yes, but these examples are deliberately contrived to illustrate the > mechanics of the mapping system, and the various edge cases. They are > not meant to be real world examples. If you used a mapping like the > above in real life, you get what you deserve, IMO. I don't see these are being edge cases since your scenario it precisely how Movable Type constructs its URLs by default. Not to say that we're going to build MT here, but that your example URL scheme is not that exotic or outlandish. I'm either for really simple or going all the way (i guess that would essentially be a port of what Ruby's Routes does) with really simple being my overwhelming preference. What you are advocating is between the two and seems more incomplete then a compromise. > Besides, the system can be designed to warn about inaccessible rules. Code to save a developer from themselves never wins me over. The table format should be clear enough that an inaccessible rule is fairly obvious. On 12/12/05, Ron Savage <[EMAIL PROTECTED]> wrote: > But what if I have a non-year value which is 4 digits? I know. This is why the current proposal (or is it the scope that's the problem?) with or without regex pattern matching that doesn't seem quite right to me. <tim/> -- Timothy Appnel http://www.timaoutloud.org/ --------------------------------------------------------------------- Web Archive: http://www.mail-archive.com/[email protected]/ http://marc.theaimsgroup.com/?l=cgiapp&r=1&w=2 To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
