Author image Robert Kiesling

NAME -- Perl library browser.


# Open from a shell prompt:

  # mkbrowser <module_pathname>  # Open a library file by name
  # mkbrowser <package_name>     # Open package(s) matching 
                                 # <package_name> (Unix specific);
  # mkbrowser                    # Browse the entire library.

# Open from a Perl script:

  use Tk::Browser;
  use Lib::Module;

  # Construct Browser object:
  $b = new Browser;   

  # Browse entire library:
  $b -> open();       

  # Browse a package by name:
  $b -> open(package => IO::File);   

  # Browse a package by module path name:
  $b -> open(pathname =>"/usr/local/lib/perl5/5.6.0/");

DESCRIPTION creates a Perl library module browser. The browser window contains a module listing at the upper left, a symbol listing at the upper right, and a text display.

If the argument to open() is a package or path name, the browser displays that package. The default is to list the first instance of each .pm and .pl file in the Perl library's @INC array of directories.

Clicking the left mouse button on a package name in the upper left-hand pane displays the package's information as described in the sections, "Package List", "Reference List", and "Text Display".

The right mouse button pops up a menu that provides options to search for text in the frame, and, in the package list, an option to open a new browser window on a selected package.

Package List

The package list in the upper left hand frame displays the name of a package if its package name or file pathname is given as an argument. Without arguments, the package list displays all of the packages in the Perl interpreter's @INC path array.

Reference List

The reference list in the upper right hand frame displays the contents of the main:: stash, the module's symbol table hash, the symbols produced by a lexical scan, or a cross reference listing, depending on the setting of options in the, "Package," menu.

Text Display

The text frame displays the module's source code, POD documentation, or class and version information depending on the settings of the, "View," menu.

If the default Perl configuration includes '.' in the @INC path array, the browser also displays modules in the current directory and its subdirectories.

The section "MENU FUNCTIONS" describes the menu bar functions.

If the entire library is scanned, the listing starts with the default class, UNIVERSAL. Selecting the main:: Symbol Table display from the View menu displays all of the symbols in the default stash, including those of the the Browser itself. In this stash also are the path names of library modules that are imported at run time.

The Modules ==> List Imports menu option opens a window that lists all symbol table imports.

The open() method's package option browses the first package which has a matching name, after locating it in the Perl library's @INC directories. The pathname argument specifies the path name of a single Perl module to browse. For example:

  . . .

  my $b = new Tk::Browser;

  if( -e $ARGV[0] ) { # Package file name.
    $b -> open(pathname => $ARGV[0]);
  } elsif( $ARGV[0] ) { # Module name
    $b -> open(package => $ARGV[0]);
  } else {  # No argument: scan everything.
    $b -> open;

  . . .



File Menu

Open Selected Module

Open a new browser for the module selected in the module list window.

Save Info...

Open a FileBrowser and prompt for a file name. Save the information in each of the browser windows to the text file.


Exit the browser and close the window.

Edit Menu


Move selected text from the editor pane to the X clipboard.


Copy selected text from the editor pane to the X clipboard.


Insert text from the X clipboard at the text editor pane's insertion point.

View Menu


View module source code of selected module.

POD Documentation

Format and view the selected module's POD documentation, if any.

Module Info

List the selected module's package name, module filename, version, and superclasses.

Package Stashes

Filter current symbol list to show only secondary stashes and their symbols.

Library Menu

Read Again

Re-scan the Perl library directories and files.

View Imported

List files in the main:: stash that were imported by Perl.

Packages Menu

main:: Stash

View the symbols in the main:: symbol table hash.

Symbol Table Imports

View symbols that are in the module's symbol table hash.


View symbols parsed from the module's source code.

Cross References

For non-local stash symbols, check for cross references in other modules that have been loaded by the interpreter. Warning: Cross referencing can take a considerable amount of time.

Help Menu


Display the version number and authorship of the Browser library.


View the Browser's POD documentation.


Search for text in that pane where the menu is popped up by pressing the right mouse button.

Open Module

In the module list window, query for the module name on which to open a new browser.


X resources in ~/Browser, ~/.Xdefaults, or ~/Xresources override some of the user interface defaults. The file, "," contains sample resource definitions.

  Browser*font: *-courier-medium-r-*-*-14-*
  Browser*geometry: 650x650
  Browser*Dialog*font: *-helvetica-medium-r-*-*-12-*
  Browser*TextUndo*font: *-courier-medium-r-*-*-12-*
  Browser*Text*background: white
  Browser*Listbox*font: *-courier-medium-r-*-*-12-*
  Browser*Menu*font: *-helvetica-medium-r-*-*-12-*
  Browser*Menu*background: lightblue
  Browser*Button*font: *-helvetica-medium-r-*-*-12-*

Refer to the Tk::CmdLine(3) manual page.


Copyright © 2001-2004 Robert Kiesling,

Licensed using the same terms as Perl. Refer to the file, "Artistic," for information.


$Id:,v 2015/04/18 18:43:42 rkiesling Exp $


mkbrowser(1), Lib::Module(3), Tk(3), perl(1), perlmod(1), perlmodlib(1), perlreftut(1), and perlref(1)

1 POD Error

The following errors were encountered while parsing the POD:

Around line 1270:

Non-ASCII character seen before =encoding in '©'. Assuming ISO8859-1