logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

CGI::Application::Plugin::ViewCode - View the source of the running application

Acknowledgements

Author

       Michael Peters, "<mpeters@plusthree.com>"

Bugs

       Please report any bugs or feature  requests  to  "bug-cgi-application-plugin-viewsource@rt.cpan.org",  or
       through                     the                    web                    interface                    at
       <http://rt.cpan.org/NoAuth/ReportBug.html?Queue=CGI-Application-Plugin-ViewCode>.  I  will  be  notified,
       and then you'll automatically be notified of progress on your bug as I make changes.

Interface

       This plugin works by adding extra run modes (named "view_code" and " view_pod ") to the application. By
       calling this run mode you can see the source or POD of the running module (by default) or you can specify
       which module you would like to view (see SECURITY).

   view_code
       This extra run mode will accept the following arguments in the query string:

       module
           The  name  of the module to view. By default it is the module currently being run. Also, since colons
           (':') aren't simply typed into URL's, you can just substitute '-' for '::'.

               ?rm=view_code?module=My-Base-Class

       highlight
           Boolean indicates whether syntax highlighting (using Syntax::Highlight::Perl::Improved)  is  "on"  or
           "off". By default it is "on".

       line_no
           Boolean  indicates  whether  the viewing of line numbers is "on" or "off". By default it is "on".  It
           "line_no" is on, you can also specify which line number you want to see by adding an  anchor  to  the
           link:

               ?rm=view_code#215

           This will take you immediately to line 215 of the current application module.

       pod Boolean indicates whether POD is seen or not. By default it is seen>.

   view_pod
       This extra run mode will accept the following arguments in the query string:

       module
           The  name  of the module to view. By default it is the module currently being run. Also, since colons
           (':') aren't simply typed into URL's, you can just substitute '-' for '::'.

               ?rm=view_pod?module=My-Base-Class

Name

       CGI::Application::Plugin::ViewCode - View the source of the running application

Security

       This  plugin  is designed to be used for development only. Please do not use it in a production system as
       it will allow anyone to see the source code for any loaded module.  Consider yourself warned.

Synopsis

       In your CGI::Application based class

           use CGI::Application::Plugin::ViewCode;

       Then you can view your module's source (or pod) as it's running by changing the url

           ?rm=view_code
           ?rm=view_code#215
           ?rm=view_code&pod=0&line_no=0
           ?rm=view_code&module=CGI-Application

           ?rm=view_pod
           ?rm=view_pod&module=CGI-Application

See Also