View on
MetaCPAN is shutting down
For details read Perl NOC. After June 25th this page will redirect to
Tim Bunce > Module-Dependency-1.86 > cgidepend


Annotate this POD


Open  2
View/Report Bugs


cgidepend - display Module::Dependency info to your web browser


Called without any/sufficient parameters you get this documentation returned.

These CGI parameters are recognized:


Must be true - used to ensure we have been called correctly


If 1, returns an image, if 0 returns the HTML, if 2 returns the HTML with no header/footer, suitable for including in another web page.


'object' (the default, set as a constant) or 'embed' - if using an SVG image, specify how you want the image embedded in the page.


Optionally, specifically ask for one kind of image format (default is 'PNG', but may be 'GIF' or whatever your GD allows)


Optionally sets the data file location. The constant DATADIR (default is '') is prepended to this to restrict the files that can be used.


Which item to start with, or...


if true, use all the scripts in the database as seeds


Which dependencies to plot - may be 'both' (the default) 'parent' or 'child'.


A regular expression - only show items matching this regex.


A regular expression - do not show items matching this regex.


The original thought that created the Module::Dependency software came when browsing our CVS repository. CVSWeb is installed to allow web browsing, and a tree of documentation is made automatically. I thought it would be useful to see what a module depended upon, and what depended upon it.

This CGI is an attempt at doing that. It can be called in 2 modes: one returns the HTML of the page, and the other returns a PNG (or GIF) that the page embeds.

The HTML mode basically gives you all the dependency info for the item, and the image shows it to you in an easy to understand way.


This program can build a client-side imagemap which allows you to click on an item in the image and make that the root of the dependency tree. If a robot, spider or similar web-crawling program finds your CGI it may decide to follow all the links it can find, including those in the imagemap. Personally I don't find this a problem, but it's just something to be aware of. You can disable the imagemap by setting the DOES_IMAGEMAP constant to zero. This also disable clickable text in SVG images, if used.

If you want to change the default values of anything, edit this script and look at the top of the file.


$Id: pmd_cgidepend.plx 6570 2006-06-27 15:01:04Z timbo $

syntax highlighting: