Skip to content

Instantly share code, notes, and snippets.

View vaishaks's full-sized avatar

Vaishak Salin vaishaks

View GitHub Profile
@vaishaks
vaishaks / tutorial.markdown
Created October 20, 2012 16:08
Open Source Plugin Tutorial

DuckDuckGo plugins react to search queries and provide useful instant answers above traditional links.

A plugin line-by-line

In this tutorial, we'll be making a plugin that checks the number of characters in a given search query. Then end result will look like this and works like this. It's in Perl though the meat of some plugin types can be written in other languages (see Plugin types).

Let's begin. Open a text editor like gedit, notepad or emacs and type the following.

package DDG::Goodie::Chars;