Comment 1 for bug 6834

Revision history for this message
Debian Bug Importer (debzilla) wrote :

Message-Id: <E1Be3QU-0007Cs-9e@riker>
Date: Fri, 25 Jun 2004 23:00:21 -0400
From: Jayen Ashar <email address hidden>
To: Debian Bug Tracking System <email address hidden>
Subject: has issues with tying read only arrays (DB_File,O_RDONLY)

--===============1405697569==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

Package: perl
Version: 5.8.3-3
Severity: grave

marked grave because it caused me data loss, though someone else may not
suffer the same fate.

If I try to tie an array read only, and the file does not exist, the
file is created (wrong), but the tie fails (right).

If I try to tie an array read only (allowing creation), and the file
does not exist, the file is created (right), but the tie is not read
only (wrong).

If I try to tie an array read only, and the file does exist, the tie
fails with no error (wrong).

If I try to tie an array read only (allowing creation), and the file
does exist, the tie succeeds (right), but the tie is not read only
(wrong).

So, when trying to tie an array read only, I can't...

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Kernel: Linux 2.6.6-1-k7
Locale: LANG=C, LC_CTYPE=C

Versions of packages perl depends on:
ii libc6 2.3.2.ds1-13 GNU C Library: Shared libraries an
ii libdb4.0 4.0.14-2 Berkeley v4.0 Database Libraries [
ii libgdbm3 1.8.3-2 GNU dbm database routines (runtime
ii perl-base 5.8.3-3 The Pathologically Eclectic Rubbis
ii perl-modules 5.8.3-3 Core Perl modules.

-- no debconf information

--===============1405697569==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename="perlbug.sh"

rm -f a
./perlnocreat.pl
ls --full-time a
sleep 1
rm -f a
/perlcreat.pl
ls --full-time a
sleep 1
rm -f a
touch a
/perlnocreat.pl
ls --full-time a
sleep 1
rm -f a
touch a
/perlcreat.pl
ls --full-time a

--===============1405697569==
Content-Type: application/x-perl
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="perlcreat.pl"

IyEvdXNyL2Jpbi9wZXJsIC13CnVzZSBEQl9GaWxlOwp0aWUgQGEsJ0RCX0ZpbGUnLCdhJyxPX1JE
T05MWXxPX0NSRUFULDA2MDAsJERCX1JFQ05PIG9yIHByaW50ICJjb3VsZCBub3Qgb3BlbiBhOiAk
IVxuIjsKJGFbMF09J2InOwp1bnRpZSBAYTsK

--===============1405697569==
Content-Type: application/x-perl
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: attachment; filename="perlnocreat.pl"

IyEvdXNyL2Jpbi9wZXJsIC13CnVzZSBEQl9GaWxlOwp0aWUgQGEsJ0RCX0ZpbGUnLCdhJyxPX1JE
T05MWSwwNjAwLCREQl9SRUNOTyBvciBwcmludCAiY291bGQgbm90IG9wZW4gYTogJCFcbiI7CiRh
WzBdPSdiJzsKdW50aWUgQGE7Cg==

--===============1405697569==--