in reply to Re^2: Interesting issue with DBD::AnyData?
in thread Interesting issue with DBD::AnyData?

Cool. Figured I wasn't understanding, thanks for the explanation. Still, the exclusive flock in open_local_file is where it is hanging, so I think there is something odd there.


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon

Replies are listed 'Best First'.
Re^4: Interesting issue with DBD::AnyData?
by jZed (Prior) on Nov 17, 2005 at 21:00 UTC
    Yes, I think you're right about flock being the problem. I think it may have been a change somewhere along the line in XML::Twig++ which AnyData uses. I'll investigate, or if you find something, patches welcome :-).

      Now I'm really confused. The reason it is blocking appears to be that it has already been opened and exclusively locked. AnyData::adConvert() opens the file using AnyData::Storage::File::open_local_file() and then AnyData::Format::XML::export() does the same thing. How did this ever work?

      Anyway, suggested patch is to AnyData/Format/XML.pm:

      *** XML.pm.old Fri Nov 18 11:11:38 2005 --- XML.pm Fri Nov 18 12:08:38 2005 *************** *** 875,877 **** #z or ( $storage and $file and !$storage->{fh} ) ! if ( ( $storage and $file ) ) { --- 875,877 ---- #z or ( $storage and $file and !$storage->{fh} ) ! if ( ( $storage and $file and !$storage->{fh} ) ) {

      But as the commented-out line suggests, there might be a very good reason that you aren't already doing that ...


      The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon