This is a small patch to DBI::Shell Version 10.7 that makes batch mode work. Without this patch, in batch mode you will get an error like this: Command 'go' not recognised at /usr/lib/perl5/site_perl/5.005/i586-linux/DBI/Shell.pm line 379, <STDIN> chunk 1.

--- Shell.pm.orig Sun Jan 28 17:09:00 2001 +++ Shell.pm Sun Jan 28 17:09:18 2001 @@ -369,7 +369,7 @@ $command = $sh->{abbrev}->{$cmd}; } else { - $command = ($sh->{command}->{$cmd}) ? $cmd : undef; + $command = ($sh->{commands}->{$cmd}) ? $cmd : undef; } if ($command) { $sh->run_command($command, $output, @args);

Replies are listed 'Best First'.
Re: DBI::Shell Version 10.7 - batch mode - patch to make it work
by billbose (Initiate) on Dec 26, 2007 at 01:56 UTC
    Sorry to ask this as a newbie. How to go about patching(using command line) any Perl module using the above patch as a example.
      The example was probably produced using the *nix tool "diff" and can be applied to a module using the *nix tool "patch". There are versions of those tools for other platforms. Read the documentation for patch to see how to do it (basically just patch file-to-patch patch-to-apply. You can also just do it by hand by finding the line numbers referenced and taking out lines with a - and adding lines with a +.
        Thank you for the answer. I managed to figure it out.