
Paul.Marquess at ntlworld
Nov 5, 2009, 11:27 AM
Post #5 of 5
(64 views)
Permalink
|
A quick survey of the modules in core shows that DB_File isn't alone - looks like it is par-for-the-course for XS modules - I see Encode, Socket, all the compression modules will all croak. Paul > -----Original Message----- > From: H.Merijn Brand [mailto:h.m.brand[at]xs4all.nl] > Sent: 04 November 2009 16:15 > To: paul.marquess[at]ntlworld.com > Cc: paul_marquess[at]yahoo.co.uk; 'Perl5 Porters' > Subject: Re: DB_File 1.82 crash > > On Wed, 4 Nov 2009 15:56:30 -0000, "Paul Marquess" > <paul_marquess[at]yahoo.co.uk> wrote: > > > You need to use a DBM_Filter > > My solution was > > utf8::encode ($name); > $db{name} = $name; > > as in this case I was *sure* about it being valid utf8, but what I mean > is that it shouldn't *die*. > > > use DB_File; > > use DBM_Filter ; > > > > $db = tie my %db, "DB_File", "test.db"; > > $db->Filter_Push('utf8'); > > > > Paul > > > > > -----Original Message----- > > > From: H.Merijn Brand [mailto:h.m.brand[at]xs4all.nl] > > > Sent: 04 November 2009 08:28 > > > To: Paul Marquess; Perl5 Porters > > > Subject: DB_File 1.82 crash > > > > > > --8<--- test.pl > > > use strict; > > > use warnings; > > > use DB_File; > > > print "Using DB_File-$DB_File::VERSION\n"; > > > tie my %db, "DB_File", "test.db"; > > > $db{name} = "Fede\x{2122}"; > > > -->8--- > > > > > > $ perl test.pl > > > Using DB_File-1.82 > > > Wide character in subroutine entry at xx.pl line 6. > > > > > > $ perl -MV=DB_File > > > DB_File > > > /pro/lib/perl5/5.10.1/PA-RISC2.0/DB_File.pm: 1.820 > > -- > H.Merijn Brand http://tux.nl Perl Monger > http://amsterdam.pm.org/ > using & porting perl 5.6.2, 5.8.x, 5.10.x, 5.11.x on HP-UX 10.20, > 11.00, > 11.11, 11.23, and 11.31, OpenSuSE 10.3, 11.0, and 11.1, 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/
|