Re: Error in DBD::PO - our fault?

"Steffen Winkler" <[email protected]>
Newsgroups gmane.comp.lang.perl.modules.dbi.sybase.devel
Message-ID <[email protected]>
Hello together,

this code in the t-script initiated the error.

 my $dbh = DBI->connect(
     "dbi:PO:f_dir=$PATH;f_ext=.po/r;f_encoding=utf-8;po_eol=$EOL;po_separator=$SEPARATOR",
     undef,
     undef,
     {
         RaiseError => 1,
         PrintError => 0,
         AutoCommit => 1,
     },
 );

The variable $PATH is untainted because I have cleaned that using this code in a module I use for all tests:

 our $UNTAINT_FILENAME_PATTERN = qr{\A (
     (?:
         (?: [A-Z] : )
         | //
     )?
     [0-9A-Z_\-/\. ]+
 ) \z}xmsi;
 our ($PATH) = getcwd() =~ $UNTAINT_FILENAME_PATTERN;
 $PATH =~ s{\\}{/}xmsg;

There is no reason to use the untaint path environment variable to open the file "$PATH/tablename.po".

But I have no idea where the problem is. I spent a lot of time for that but then I gave up some month ago.

I have Perl "v5.12.1".

*** by the way:

My newest problem with testing using -T was the error:
# died: Insecure dependency in eval_sv() while running with -T switch at D:\build\Getopt-Long-DescriptivePod-0.01\blib\lib/Getopt/Long/DescriptivePod.pm line
 85.
I only called "Params::Validate::validate".
I switched off all the taint stuff and released the module quickly.

***

I go to bed now, because tomorrow I have to be ready for my own marriage. But I just wanted to answer your mail quickly.


-- Steffen

-------- Original-Nachricht --------
> Datum: Fri, 24 Jun 2011 09:15:18 +0200
> Von: "H.Merijn Brand" <[email protected]>
> An: DBI Developers Mailing List <[email protected]>
> CC: Jens Rehsack <[email protected]>, [email protected]
> Betreff: Error in DBD::PO - our fault?

> As I have updated two boxes to perl-5.14.1 in production code, I'm
> running through everything that I have ever tested on one of those
> boxes to check if that would still pass under perl-5.14.1. Of course
> there are some modules that won't ever compile/build/run again on a
> more modern box with a recent OS (like Bundle::Xmms), but some others
> warrant a mail to the author, like when the build issues warnings as
> 
> Use of qw(...) as parentheses is deprecated at inc/Devel/CheckLib.pm line
> 191.
> 
> But this one makes me wonder if we broke something in DBI, if is is
> perl-5.14 to blame or if it is the module to blame:
> 
> 
> 
> CPAN.pm: Going to build S/ST/STEFFENW/DBD-PO-2.10.tar.gz
> 
> Created MYMETA.yml and MYMETA.json
> Creating new 'Build' script for 'DBD-PO' version '2.10'
> Building DBD-PO
>   STEFFENW/DBD-PO-2.10.tar.gz
>   ./Build -- OK
> Running Build test
> t/01_Locale-PO/01_quote.t ................................. ok
> t/01_Locale-PO/02_without_emty_lines.t .................... ok
> t/02_Text-PO/01_quote.t ................................... ok
> t/03_DBD-PO/01_create_table.t ............................. 1/7
> DBD::PO::db do failed:
> Execution ERROR: Insecure dependency in open while running with -T switch
> at /pro/lib/perl5/5.14.1/x86_64-linux-ld/IO/File.pm line 185.
>  called from t/03_DBD-PO/01_create_table.t at 39.
> 
>  at /pro/lib/perl5/site_perl/5.14.1/x86_64-linux-ld/DBI/DBD/SqlEngine.pm
> line 795
>  [for Statement "    CREATE TABLE dbd_po_test.po (
>         comment    VARCHAR,
>         automatic  VARCHAR,
>         reference  VARCHAR,
>         obsolete   INTEGER,
>         fuzzy      INTEGER,
>         msgctxt    VARCHAR,
>         msgid      VARCHAR,
>         msgstr     VARCHAR
>     )
> "] at t/03_DBD-PO/01_create_table.t line 39.
> # Looks like you planned 7 tests but ran 3.
> # Looks like your test exited with 2 just after 3.
> t/03_DBD-PO/01_create_table.t ............................. Dubious, test
> returned 2 (wstat 512, 0x200)
> Failed 4/7 subtests
> 
> 
> -- 
> H.Merijn Brand  http://tux.nl      Perl Monger  http://amsterdam.pm.org/
> using 5.00307 through 5.14 and porting perl5.15.x on HP-UX 10.20, 11.00,
> 11.11, 11.23 and 11.31, OpenSuSE 10.1, 11.0 .. 11.4 and AIX 5.2 and 5.3.
> http://mirrors.develooper.com/hpux/           http://www.test-smoke.org/
> http://qa.perl.org      http://www.goldmark.org/jeff/stupid-disclaimers/

-- 
Empfehlen Sie GMX DSL Ihren Freunden und Bekannten und wir
belohnen Sie mit bis zu 50,- Euro! https://freundschaftswerbung.gmx.de
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.