DBI-Shell
view release on metacpan or search on metacpan
lib/DBI/Shell.pm view on Meta::CPAN
warn "Failed: $@";
shift @DBI::Shell::Std::ISA;
shift @pi;
} else {
$sh->print_buffer_nop("Loaded plugins $mod\n")
unless $sh->{batch};
}
}
}
local ($|) = 1;
# plug-ins should remove options they recognise from (localized) @ARGV
# by calling Getopt::Long::GetOptions (which is already in pass_through mode).
foreach my $pi (@pi) {
local *ARGV = $sh->{unhandled_options};
$pi->init($sh);
}
return @pi;
}
sub default_config {
my $sh = shift;
lib/DBI/Shell.pm view on Meta::CPAN
#
# Handle command line parameters
#
# data_source and user command line parameters overrides both
# environment and config settings.
#
$DB::single = 1;
local (@ARGV) = @args;
my @options = values %{ $sh->{options} };
Getopt::Long::config('pass_through'); # for plug-ins
unless (GetOptions($sh, 'help|h', @options)) {
$class->usage;
croak "DBI::Shell aborted.\n";
}
if ($sh->{help}) {
$class->usage;
return;
}
lib/DBI/Shell/Completion.pm view on Meta::CPAN
# closedir DIR;
# }
# }
# my $driver = $sh->{data_source};
# # print STDERR join( " ", @pi, $driver, "\n");
# foreach my $pi (sort @pi) {
# #local $DBI::Shell::SHELL = $sh; # publish the current shell
# eval qq{ use $pi };
# $sh->alert("Unable to load $pi: $@") if $@;
# }
# # plug-ins should remove options they recognise from (localized) @ARGV
# # by calling Getopt::Long::GetOptions (which is already in pass_through mode).
# foreach my $pi (@pi) {
# #local *ARGV = $sh->{unhandled_options};
# $pi->init($sh);
# }
# }
sub populate {
my $sh = shift;
my $list = shift;
( run in 1.108 second using v1.01-cache-2.11-cpan-49f99fa48dc )