| 1 | package CPANPLUS::Shell::Wx; | ||
| 2 | |||
| 3 | # Module name: CPANPLUS::Shell::Wx | ||
| 4 | # Author: Skaman Sam Tyler | ||
| 5 | # Date: May 9th, 2008 | ||
| 6 | # Description: This is a perl Module which is a frontend to CPANPLUS. | ||
| 7 | # | ||
| 8 | # NOTES: | ||
| 9 | # NOTE I have used the methods contained in CPANPLUS::Shell::Tk to create | ||
| 10 | # my skeleton code for this module. | ||
| 11 | |||
| 12 | |||
| 13 | # Preloaded methods go here. | ||
| 14 | |||
| 15 | =head1 NAME | ||
| 16 | |||
| 17 | CPANPLUS::Shell::Wx - A CPANPLUS GUI Shell written in wxWidgets | ||
| 18 | |||
| 19 | =head1 AUTHOR | ||
| 20 | |||
| 21 | Skaman Sam Tyler <skamansam@gmail.com> | ||
| 22 | |||
| 23 | =head1 SYNOPSIS | ||
| 24 | |||
| 25 | perl -MCPANPLUS -eshell(Wx); | ||
| 26 | |||
| 27 | |||
| 28 | =head1 DESCRIPTION | ||
| 29 | |||
| 30 | This is a GUI shell for CPANPLUS. | ||
| 31 | |||
| 32 | =head2 FURTHER HELP | ||
| 33 | |||
| 34 | There is full online documentation, accessible via the help menu. | ||
| 35 | |||
| 36 | =head1 SEE ALSO | ||
| 37 | |||
| 38 | CPAN, CPANPLUS, CPANPLUS::Shell::Tk | ||
| 39 | |||
| 40 | website: http://wxcpan.googlecode.com | ||
| 41 | mailing-list: wxcpan@googlegroups.com | ||
| 42 | mailing-list website: http://groups.google.com/group/wxcpan | ||
| 43 | |||
| 44 | =head1 AUTHOR | ||
| 45 | |||
| 46 | Skaman Sam Tyler, E<lt>skamansam@gmail.comE<gt> | ||
| 47 | website: http://rbe.homeip.net | ||
| 48 | |||
| 49 | =head1 COPYRIGHT AND LICENSE | ||
| 50 | |||
| 51 | Copyright (C) 2008 by Skaman Sam Tyler | ||
| 52 | |||
| 53 | This library is free software; you can redistribute it and/or modify | ||
| 54 | it under the same terms as Perl itself, either Perl version 5.8.8 or, | ||
| 55 | at your option, any later version of Perl 5 you may have available. | ||
| 56 | |||
| 57 | =cut | ||
| 58 | |||
| 59 | 1 | ▶ | use 5.005; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 60 | 1 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 61 | |||
| 62 | 1 | ▶ | use CPANPLUS::Error; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 63 | 1 | ▶ | use CPANPLUS::Backend; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 64 | 1 | ▶ | use CPANPLUS::Configure::Setup; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 65 | 1 | ▶ | use CPANPLUS::Internals::Constants; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 66 | 1 | ▶ | use CPANPLUS::Internals::Constants::Report qw[GRADE_FAIL]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 67 | |||
| 68 | 1 | ▶ | use Cwd; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 69 | 1 | ▶ | use IPC::Cmd; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 70 | 1 | ▶ | use Data::Dumper; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 71 | 0 | ▶ | use Wx; |
|
Subroutine
BEGIN: called CC=1 SCAR=2.6
| |||
| 72 | |||
| 73 | use Module::Load qw[load]; | ||
| 74 | use Params::Check qw[check]; | ||
| 75 | use Module::Load::Conditional qw[can_load check_install]; | ||
| 76 | use Locale::Maketext::Simple Class => 'CPANPLUS', Style => 'gettext'; | ||
| 77 | |||
| 78 | use CPANPLUS::Shell::Wx::App; | ||
| 79 | |||
| 80 | local $Params::Check::VERBOSE = 1; | ||
| 81 | local $Data::Dumper::Indent = 1; # for dumpering from ! | ||
| 82 | |||
| 83 | #---- where we begin! | ||
| 84 | BEGIN { | ||
| 85 | use vars qw( @ISA $VERSION ); | ||
| 86 | @ISA = qw( CPANPLUS::Shell::_Base CPANPLUS::Backend); | ||
| 87 | $VERSION = '0.04'; | ||
| 88 | } | ||
| 89 | |||
| 90 | #initialize the class | ||
| 91 | sub new { | ||
| 92 | my $proto = shift; | ||
| 93 | my $class = ref($proto) || $proto; | ||
| 94 | |||
| 95 | my $self ={}; | ||
| 96 | bless $self,$class; | ||
| 97 | return $self; | ||
| 98 | } | ||
| 99 | |||
| 100 | #create the shell and start the app | ||
| 101 | sub shell{ | ||
| 102 | my $self=shift; | ||
| 103 | my $app=CPANPLUS::Shell::Wx::App->new(); | ||
| 104 | $app->MainLoop; | ||
| 105 | } | ||
| 106 | |||
| 107 | 1; | ||