CGI-Inspect

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

    *   Exit - Stop inspecting

  Creating Plugins
    Plugins are easy to create! They are really just subroutines that return
    a string for what they want printed. All of the built-in plugins actuall
    inherti from CGI::Inspect::Plugin, which just provides some convenience
    methods. The main CGI::Inspect module will create an instance of your
    plugin with Plugin->new, and then will execute it with $plugin->process.

    Plugins can, however, make use of Continuity, including utilizing
    callbacks. Here is the complete source to the 'Exit' plugin, as a fairly
    simple example.

      package CGI::Inspect::Plugin::Exit;

      use strict;
      use base 'CGI::Inspect::Plugin';

      sub process {
        my ($self) = @_;
        my $exit_link = $self->request->callback_link(

lib/CGI/Inspect.pm  view on Meta::CPAN

=back

=head2 Creating Plugins

Plugins are easy to create! They are really just subroutines that return a
string for what they want printed. All of the built-in plugins actuall inherti
from L<CGI::Inspect::Plugin>, which just provides some convenience methods. The
main CGI::Inspect module will create an instance of your plugin with
Plugin->new, and then will execute it with $plugin->process.

Plugins can, however, make use of Continuity, including utilizing callbacks.
Here is the complete source to the 'Exit' plugin, as a fairly simple example.

  package CGI::Inspect::Plugin::Exit;

  use strict;
  use base 'CGI::Inspect::Plugin';

  sub process {
    my ($self) = @_;
    my $exit_link = $self->request->callback_link(

lib/CGI/Inspect.pm  view on Meta::CPAN

  do {
    my $content = '';
    if($request->param('plugin')) {
      $content .= $self->{plugins_by_name}->{$request->param('plugin')}->process();
    } else {
      foreach my $plugin (@{$self->{plugin_objects}}) {
        $content .= $plugin->process();
      }
    }
    $self->display($content);
    $request->next->execute_callbacks
      unless $self->{do_exit};
  } until($self->{do_exit});
  $request->print("<script>window.close();</script>");
  Coro::Event::unloop();
  $request->print("Exiting...");
  $request->end_request;
}

=head1 SEE ALSO



( run in 1.183 second using v1.01-cache-2.11-cpan-9b1e4054eb1 )