Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

Re: Let shortcut types have useful behavior in the parameterless case

by demerphq (Chancellor)
on Aug 15, 2006 at 16:00 UTC ( #567493=note: print w/replies, xml ) Need Help??


in reply to Let shortcut types have useful behavior in the parameterless case

apc:// has had a no-target default since it was created.

And I agree with tye that any handler that doesnt have a sane no-target possibility should foward to the appropriate documentation page.

---
$world=~s/war/peace/g

  • Comment on Re: Let shortcut types have useful behavior in the parameterless case

Replies are listed 'Best First'.
Re^2: Let shortcut types have useful behavior in the parameterless case
by jdporter (Canon) on Aug 15, 2006 at 17:24 UTC
    any handler that doesnt have a sane no-target possibility should foward to the appropriate documentation page

    That's a reasonable thing to do, but to my mind a better approach would be to let [foo://] DWIM from the writer's POV. IOW, if I want to link to the Perl Changes Browser, I write [apc://] If I want to link to the Wiki Wiki Web, I write [c2://]. If I want to link to the Perl docs, I write [doc://]. If I want to link to Wikipedia, I write [wp://]. And so on. Rather than assuming the author made an error.

    There's precedent for both approaches ([id://] vs. [apc://]). However, given that [id://] doesn't have any other useful default semantics, I'm not convinced that this is the precedent to follow. I'd rather follow the [apc://] precedent.

    We're building the house of the future together.
      I think you misread. demerphq specified the handlers without "a sane no-target possibility" (e.g. the handlers for "http", "id" and similar) should link to docs on how to use them, not all of handlers.

        You're right - I did misread.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://567493]
help
Chatterbox?
[marinersk]: choroba++
[choroba]: it's a long running test, so it's normally skipped unless an env var is set
[choroba]: nobody has been bothered to set the variable in the last 3 years
[marinersk]: sub newtest{my $expected_result = &target('foo'); my $actual_result = &target('foo'); if ($actual_result eq $expected_result) { &tdd_success(); } else { &tdd_fail(); } } # Test works after three years!
[choroba]: or nobody bothered...
[choroba]: The problem was bigger, as the test tried to call a method that didn't exist anymore
[marinersk]: :: ducking ::
[choroba]: because, someone renamed the method, but didn't notice it was used in the test, as the test was skipped
[marinersk]: Well, if the method doesn't exist, it would be hard to pass the test.
[choroba]: later, someone removed the new method, as all its usage places were safe, but didn't notice the test still used the old name

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (11)
As of 2017-05-25 15:08 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?