more complete pod

This commit is contained in:
Graham Knop 2010-05-28 10:48:09 -05:00
parent 4a61946399
commit 470c79f18c
8 changed files with 482 additions and 41 deletions

View file

@ -1,3 +1,21 @@
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2009 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=head1 NAME
WebGUI::Upgrade::File::pl - Upgrade class for Perl scripts
=cut
package WebGUI::Upgrade::File::pl;
use Moose;
use Class::MOP::Class;
@ -7,8 +25,9 @@ with 'WebGUI::Upgrade::File';
sub run {
my $self = shift;
my $configFile = shift;
local $ENV{WEBGUI_CONFIG} = $self->configFile;
local $ENV{WEBGUI_CONFIG} = $configFile;
local $ENV{WEBGUI_UPGRADE_VERSION} = $self->version;
local $ENV{WEBGUI_UPGRADE_QUIET} = $self->quiet;
return _runScript($self->file);

View file

@ -1,13 +1,40 @@
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2009 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=head1 NAME
WebGUI::Upgrade::File::pod - Upgrade class for POD documents
=cut
package WebGUI::Upgrade::File::pod;
use Moose;
use POSIX qw(_exit);
with 'WebGUI::Upgrade::File';
sub once { 1 }
sub run {
my $self = shift;
my $configFile = shift;
if ( ! $self->quiet ) {
system { $^X } $^X, '-MPod::Perldoc', '-ePod::Perldoc->run', $self->file;
my $pid = fork;
if (! $pid) {
require Pod::Perldoc;
@ARGV = ($self->file);
Pod::Perldoc->run;
_exit;
}
waitpid $pid, 0;
}
return 1;

View file

@ -1,13 +1,32 @@
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2009 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=head1 NAME
WebGUI::Upgrade::File::sql - Upgrade class for SQL scripts
=cut
package WebGUI::Upgrade::File::sql;
use Moose;
with 'WebGUI::Upgrade::File';
sub run {
my $self = shift;
my $configFile = shift;
my @command_line = (
$self->upgrade->mysql,
$self->upgrade->mysqlCommandLine($self->configFile),
$self->upgrade->mysqlCommandLine($configFile),
'--batch',
'--execute=source ' . $self->file,
);

View file

@ -1,3 +1,21 @@
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2009 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=head1 NAME
WebGUI::Upgrade::File::txt - Upgrade class for text documents
=cut
package WebGUI::Upgrade::File::txt;
use Moose;
with 'WebGUI::Upgrade::File';
@ -6,13 +24,14 @@ sub once { 1 }
sub run {
my $self = shift;
my $configFile = shift;
if ( ! $self->quiet ) {
open my $fh, '<', $self->file;
while ( my $line = <$fh> ) {
print $line;
}
close $fh;
if (-t STDIN) {
if (-t) {
print "\nPress ENTER to continue... ";
my $nothing = <>;
}

View file

@ -1,3 +1,21 @@
=head1 LEGAL
-------------------------------------------------------------------
WebGUI is Copyright 2001-2009 Plain Black Corporation.
-------------------------------------------------------------------
Please read the legal notices (docs/legal.txt) and the license
(docs/license.txt) that came with this distribution before using
this software.
-------------------------------------------------------------------
http://www.plainblack.com info@plainblack.com
-------------------------------------------------------------------
=head1 NAME
WebGUI::Upgrade::File::wgpkg - Upgrade class for WebGUI packages
=cut
package WebGUI::Upgrade::File::wgpkg;
use Moose;
with 'WebGUI::Upgrade::File';