Padre::Plugin::ClassSniff - Simple Class::Sniff interface for Padre


Padre-Plugin-ClassSniff documentation Contained in the Padre-Plugin-ClassSniff distribution.

Index


Code Index:

NAME

Top

Padre::Plugin::ClassSniff - Simple Class::Sniff interface for Padre

VERSION

Top

version 0.30

SYNOPSIS

Top

Use this like any other Padre plugin. To install Padre::Plugin::ClassSniff for your user only, you can type the following in the extracted Padre-Plugin-ClassSniff-... directory:

  perl Makefile.PL
  make
  make test
  make installplugin

Afterwards, you can enable the plugin from within Padre via the menu Plugins->Plugin Manager and there click enable for Class::Sniff.

DESCRIPTION

Top

This module adds very, very basic support for running Class::Sniff with the default settings against the document (assumed to be a class) in the current editor tab.

The output will go to the Padre output window.

TODO: Configuration

BUGS

Top

Please report any bugs or feature requests to http://padre.perlide.org/

COPYRIGHT & LICENSE

Top

AUTHORS

Top

COPYRIGHT AND LICENSE

Top


Padre-Plugin-ClassSniff documentation Contained in the Padre-Plugin-ClassSniff distribution.

package Padre::Plugin::ClassSniff;
BEGIN {
  $Padre::Plugin::ClassSniff::VERSION = '0.30';
}

# ABSTRACT: Simple Class::Sniff interface for Padre

use 5.008;
use warnings;
use strict;

use Padre::Config ();
use Padre::Wx     ();
use Padre::Plugin ();

our @ISA = 'Padre::Plugin';

sub padre_interfaces {
	'Padre::Plugin' => 0.47,;
}

sub plugin_name {
	Wx::gettext('Class Sniffer');
}

sub menu_plugins_simple {
	my $self = shift;
	return $self->plugin_name => [
		Wx::gettext('Print Report') => sub { $self->print_report },
		Wx::gettext('About')        => sub { $self->show_about },
	];
}

sub print_report {
	my $self = shift;
	require Padre::Task::ClassSniff;
	Padre::Task::ClassSniff->new(
		mode => 'print_report',
	)->schedule();
}



sub show_about {
	my $self = shift;

	# Generate the About dialog
	my $about = Wx::AboutDialogInfo->new;
	$about->SetName("Padre::Plugin::ClassSniff");
	$about->SetDescription( <<"END_MESSAGE" );
Initial Class::Sniff support for Padre
END_MESSAGE
	$about->SetVersion($Padre::Plugin::ClassSniff::VERSION);

	# Show the About dialog
	Wx::AboutBox($about);

	return;
}

1;




__END__