Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?

Opera + Firefox browser Shortcut for searching CPAN & Perldoc

by monkfan (Curate)
on Apr 13, 2005 at 03:01 UTC ( #447243=snippet: print w/replies, xml ) Need Help??
Description: Here are the snippets that allow you to do custom searching by keyword in Opera and Firefox for CPAN repository.

If you are using Opera browser, with this snippet you can directly search CPAN by typing this command under address bar:

cpan Module::Name
cpan Anything

Store this snippet under file: ~/.opera/search.ini

For Firefox, please follow subsequent instruction:
[Search Engine 41]
Is post=0
Has endseparator=0
Search Type=0
 * Bookmark: 
   where the %s  will be replaced by the query string
 * Give the bookmark the keyword: cpan
 * By typing: cpan Module::Name -in the addressbar will get the module
Replies are listed 'Best First'.
Re: Opera + Firefox browser Shortcut for searching CPAN
by dbwiz (Curate) on Apr 13, 2005 at 08:24 UTC

    An useful variation would be a bookmark with keyword "perldoc":

    When you type "perldoc Module::Name", it will take you directly to the docs.

    However, you must provide an exact name. No search on partial matches is provided.

    Update Removed a spurious "=" sign from the URL. Thanks ewijava.

      Have you tested it? Accessing perldoc of a module in CPAN is done via authors directory. Hence your solution will fail.

      Alternatively this is the snippet to access website. Applicable for both Opera and Firefox.
Re: Opera + Firefox browser Shortcut for searching CPAN & Perldoc
by Roy Johnson (Monsignor) on Apr 13, 2005 at 17:48 UTC
    Firefox has a search box separate from (to the right of) the address box, and has a mechanism set up for populating it. CPAN has an entry already, and perldoc does too. They've got them for ebay, pricegrabber,, wikipedia,, ... the list just goes on and on. It seems a little silly to roll your own mechanism for Firefox.

    Caution: Contents may have been coded under pressure.
Re: Opera + Firefox browser Shortcut for searching CPAN
by tlm (Prior) on Apr 13, 2005 at 12:08 UTC

    Here's a couple useful ones for Firefox

    keyword: pdoc location: example: pdoc perltoot keyword: pfunc location: example: pfunc chomp
    The choice of keywords is arbitrary; use whatever you like.

    the lowliest monk

Re: Opera + Firefox browser Shortcut for searching CPAN & Perldoc
by bhilton (Initiate) on Apr 14, 2005 at 13:35 UTC
    Maybe it's because I'm on Linux or something, but I can't get the Firefox bookmarks to work as easily as you guys seem to.

    I've added a "cpan" bookmark with the following location:
    If I try to search for something with colons (like Text::CSV), I get an alert popup with the following text:

    "The URL is not valid and cannot be loaded."

    I either have to use "keyword:cpan" instead of "cpan" or replace colons with "%3a" in the module name.

      Just browse on over to your site of choice, right click in the search text field and select 'Add a Keyword for this search'. This will do the same with less typing.

      satchm0h...stumbling down the path toward enlightenment
      Try to use the snippet I provide *verbatim*, do not alter it. Even under Linux, you can get the result:
      Just with command: cpan Text::CSV
      Notice the common pattern between the two URLs.
Re: Opera + Firefox browser Shortcut for searching CPAN & Perldoc
by Intrepid (Deacon) on May 15, 2005 at 01:53 UTC

    I think this is a nice tip, even if it is not Perl code ;-). ewijaya wrote:

    Store this snippet under file: ~/.opera/search.ini

    Of course a user of MSWindows (who might well be using Opera) will not have any " ~ " dir. On my MS Windows XP system I empirically determined that this expression gives the location of the file which one wants to insert the Opera "snippet" into:

    perl -MFile::Spec::Functions -le "print catfile( \$ENV{USERPROFILE}=> +q[APPLIC~1]=> q[Opera/Opera7/profile/search.ini] )"
      That script doesn't work for me, however I am using Opera 9.x, not Opera 7. If I remember correctly, the search.ini file can be located in the C:\program files\Opera\
Log In?

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: snippet [id://447243]
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others lurking in the Monastery: (5)
As of 2023-12-08 20:18 GMT
Find Nodes?
    Voting Booth?
    What's your preferred 'use VERSION' for new CPAN modules in 2023?

    Results (37 votes). Check out past polls.