Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

sgt's scratchpad

by sgt (Deacon)
on Nov 03, 2005 at 23:14 UTC ( [id://505547]=scratchpad: print w/replies, xml ) Need Help??

Problems with DBM::Deep on cygwin

tests are with perl5.8.8 installed in /opt/perl588 and not cygwin stock perl on latest DBM::Deep 1.0006

So far:

  • test 02 has failures which don't involve temp files.
  • test 04 has a systematic warning. it occurs between 110 and 111 (lines 205-208). Can't remove directory /tmp/zIyf9JDNQb: Directory not empty at /usr/lib/perl5/5.8/File/Temp.pm line 893. Not sure what triggers it as the temp file should be destroyed only at the end of the file...this seems very wrong!
  • trying to see something with DDS makes it die on spot!
  • trying Data::Dumper...ok...but says that $db is $VAR1 = bless( [], 'DBM::Deep::Array' ); just after 108. Is that supposed to be the case?.
  • After the double assignment we see what is expected...
    $VAR1 = bless( [ bless( [ '1', '2', '3' ], 'DBM::Deep::Array' ), bless( { 'a' => 'foo' }, 'DBM::Deep::Hash' ) ], 'DBM::Deep::Array' );
  • maybe the callback is somehow triggered when $db has essentially no content but the file is not empty...
  • ok 106 ok 107 ok 108 $VAR1 = bless( [], 'DBM::Deep::Array' ); -rw------- 1 steph Ninguno 1825 Oct 8 11:51 /tmp/dResAx20UF/tmpl6Ml $VAR1 = bless( [ bless( [ '1', '2', '3' ], 'DBM::Deep::Array' ), bless( { 'a' => 'foo' }, 'DBM::Deep::Hash' ) ], 'DBM::Deep::Array' ); -rw------- 1 steph Ninguno 2599 Oct 8 11:51 /tmp/dResAx20UF/tmpl6Ml ok 109 - Reuse of same space with array successful $VAR1 = bless( [ bless( [ '1', '2', '3' ], 'DBM::Deep::Array' ), bless( { 'a' => 'foo' }, 'DBM::Deep::Hash' ) ], 'DBM::Deep::Array' ); -rw------- 1 steph Ninguno 2599 Oct 8 11:51 /tmp/dResAx20UF/tmpl6Ml ok 110 - Reuse of same space with hash successful $VAR1 = bless( [ bless( [ '1', '2', '3' ], 'DBM::Deep::Array' ), bless( { 'a' => 'foo' }, 'DBM::Deep::Hash' ) ], 'DBM::Deep::Array' ); -rw------- 1 steph Ninguno 2599 Oct 8 11:51 /tmp/dResAx20UF/tmpl6Ml ok 111 ok 112 ok 113 - FETCH fails on an illegal key # Looks like you planned 128 tests but only ran 113. Can't remove directory /tmp/dResAx20UF: Directory not empty at /usr/li +b/perl5/5.8/File/Temp.pm line 893
    2007/10/08 I am now experimenting some kind of hysteresis, not seeing the warning anymore but instead test failures. Need a fresh start at this recording everything tried. pls ignore last message and the following paragraph. I'll have a look again this weekend. In my last message about test 04 and tempfile destruction I was not clear enough. My point was the following:
  • if we ignore the last test of 04 '__END__'ing it just before say, then $fh and $filename are at file scope and I believe tempfile destruction should be triggered at EOF (or when perl reclaims the my variables).
  • but this does not happen. tempfile destruction is triggered before around test 108...and I don't understand why (maybe tie magic does something). So the situation is test 04 passing all its tests but leaving garbage in /tmp
  • I'll try to take out a smaller test snippet exhibating this behaviour

    Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Domain Nodelet?
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this?Last hourOther CB clients
    Other Users?
    Others lurking in the Monastery: (3)
    As of 2024-10-03 14:51 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?
      The PerlMonks site front end has:





      Results (42 votes). Check out past polls.

      Notices?
      erzuuli‥ 🛈The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.