|Do you know where your variables are?|
Batch of improvements appliedby tye (Sage)
|on Feb 16, 2006 at 08:59 UTC||Need Help??|
A long-building batch of improvements have just been rolled onto the PerlMonks production web servers. Most of the end-user effects were rather small, but there were also some bigger behind-the-scenes improvements and the total change was fairly large.
My favorite user-visible change is that PerlMonks' "Search" box lets you jump directly to any URL you could construct with any of our linking short-cuts. Say you need to read Data::Diver docs and already happen to have a PerlMonks page loaded into your browser (don't you always?). Type "mod://Data::Diver" into the "Search" box, submit, and your browser jumps right to the requested page in search.cpan.org.
Square brackets can also be included so you can paste link specs like "[id://22609|someone]" into the search box to see / test where they lead and without having to trim them down.
Part of the motivation for this feature is to provide a way for external clients to faithfully translate PM link specs. For example, if you write a PM chat client, you can parse out the link patterns and then fetch (with 'follow redirects' disabled) "http://perlmonks.org/?node=[doc://@ARGV]" and find out exactly what URL PM would use for such a link and what title would be displayed. The destination URL will be in the "Location" header (of course) and the PM title will be in the "X-Title" header. Or you could just have such link specs just link to the above (redirecting) URL and not have to pre-fetch any URLs (and display some other title / label for the link, perhaps the full link spec, as typed).
Note that chat clients should also take advantage of the fairly recently added ability to get chatter as already processed HTML (including enforcement of proper nesting of tags, etc.). I'll let demerphq expand on this point, if he'd be so kind. (This means many clients won't need the above feature for translating links, but it can still be useful, especially for some clients).
Next, another change that is a bit complicated to explain. It used to be that  would first look for nodes titled "12345" and only go to node ID 12345 if no matching title was found. Now  and ?node=12345 and typing 12345 into the "Search" box all always just try to go to node ID 12345 (like [id://12345] and ?node_id=12345 have done and contnue to do). This is more efficient, prevents some problem situations, and makes it easy and reliable to use the "Search" box to jump to nodes by ID number.