Skip to content

Adding ! redirect for duckduckgo #269

wants to merge 1 commit into from

7 participants

Getty commented Aug 28, 2011

This patch enables on metacpan that a query starting with ! will go to duckduckgo. If the query starts with "! " then the "! " will be removed before redirect, so "! test" will search for test on duckduckgo (that could be probably later replaced with a DIRECT integration of the ZeroClickInfo), and everything else untouched. This way people have all the redirect bangs that are available via DuckDuckGo also in metacpan. This feature is for people who mostly search on metacpan but still want access to all other search engines via their default search engine, which could be metacpan then.

MetaCPAN member
rafl commented Aug 28, 2011

The point of not doing it is to not have more code for no clear gain.

Besides that, there's also the point of not being opinionated. While we all love, support, and sometimes even use duckduckgo, I can't see much of a reason why it should be featured as prominently on MetaCPAN, while other search engines aren't. That is, if I would see the point of this change in the first place - I'm not recommending adding support for other search engines as well.

Getty commented Aug 28, 2011

DuckDuckGo is the only search engine with offers the bang paths to be able to redirect to ALL search engines. If another search engine has this option i would consider it, but i think this is the most political correct way.


I love DuckDuckGo and I use it all the time.
But I have to agree with @rafl here; I don't think people would go to metacpan to search for things unrelated to cpan. And if I'm browsing metacpan and I have to make a duckduckgo query I simply do:

:o query

Likewise, if I need to make a metacpan query while I am somewhere else, I simply do:

:o c metacpan query

The magic of keyword searches.
I have never found a use for the bang syntax over at duckduckgo either, but perhaps 'the masses' do. :-)

Getty commented Aug 28, 2011

@trapd00r most people use duckduckgo as default search engine to be totally independet of the browser. So if you set it for example in chrome as default search engine and then say duckduckgo "remove the header" then you have like a search engine that is "your browser" you should try that feeling, and then the bang syntax makes sense. its exactly the same you said, actually its the question here: what you want as default? i would like that if i give "Just a word" that word is searched on metacpan, if i want something else i use a bang path. That technical requires this feature. And i think other people also would like to have it this way. The point here still is: what is the disadvantage of doing it (beside one regexp less wow).

Getty commented Aug 28, 2011

alternative i code my own default search engine ;) but i think we agree that most people arent able todo so. Think about the perl coders who are not "pro", they will love then to use metacpan as default, and encourage them to use metacpan as default, so that they come more often to the right CPAN module then to the right "solution that is written in the web". I think this is also part of the mission of metacpan, or not? ;)

MetaCPAN member
monken commented Aug 28, 2011

People shouldn't expect metacpan to do anything besides searching the CPAN. As soon as we start integrating stuff like this, people will send in more patches that change metacpan to their personal expectations. I don't want that to happen.

It would be quite trivial to write a greasemonkey script that implements that functionality on the client.

Getty commented Aug 28, 2011

a greasemonkey script again excludes huge amount of users. I just say its a quality gain. Also a promotional gain. I dont see a personalization here. not only perl starter can have use of this feature, also the extreme powerusers (and i know minimum 2 people who want this feature too for themself) like it to have metacpan as "default world" and just bang out to everything else. CPAN is my world.

MetaCPAN member
oalders commented Aug 28, 2011

This patch seems benign to me. It doesn't introduce much extra logic (9 lines of code?) and it adds some interesting functionality. I don't use duckduckgo myself, but I certainly wouldn't be bothered by having this in the app.

avar commented Aug 28, 2011

FWIW I was going to submit a patch at some point to make:

! foo

Find "foo", and then go to the first result on metacpan.

That way on DDG you could search for:

!mcpan ! foo

And not have to click on the first result.

But I agree that making metacpan redirect to DDG on ! makes no sense.

Getty commented Aug 28, 2011

avar: you can still make it with any other char, also you can set the "luckily" parameter and get the same effect ;)

BTW: on duckduckgo we use \ for this, so \ is like i feel ducky so direct to first hit

MetaCPAN member

We're trying to do one thing well, not be everything to everybody, so sorry, but I think this is out of the scope of metacpan, and I'm closing this request.

@mbeijen mbeijen pushed a commit to mbeijen/metacpan-web that referenced this pull request Dec 3, 2013
@avar avar Implement DuckDuckGo-like ! (or \\) syntax for IFL
Instead of having to pass lucky=1 as a GET parameter you can now enter
a search term beginning with "!" or "\" to have MetaCPAN return the
first result to you.

E.g. searching for "!Plack" or "\Plack" will redirect you to

This is an alternative to pressing Shift+Enter on the site to go to
the first result, but the real value is being able to use
e.g. DuckDuckGo to search for "!cpan !Plack" to go to the first
MetaCPAN result.

See-Also: CPAN-API#269
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.