Jetzt bekomme ich folgende Fehlermeldung beim ausfuehren des Skriptes:
can not tie segment.dat:No such file or directory at //az-guinan/applications/Pe
rl/site/lib/XML/Edifact.pm line 77.
Skript:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#!/usr/bin/perl
use warnings;
use strict;
use XML::Edifact;
use IO::File;
# open the database
XML::Edifact::open_dbm();
# read edi message
XML::Edifact::read_edi_message("test.edi");
# print xml to standout
print &XML::Edifact::make_xml_message();
# print xml to somefile
my $xml=new IO::File(">some.xml");
XML::Edifact::make_xml_message($xml);
$xml->close();
# close database
XML::Edifact::close_dbm();
Codeabschnitt aus Edifact.pm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
sub open_dbm {
my ($directory,$fcntl) = @_;
$directory = $XML::Edifact::Config::DAT unless $directory;
$fcntl = O_RDONLY unless $fcntl;
# HIER DER FEHLER...
tie(%SEGMT, 'SDBM_File', $directory.'/segment.dat', $fcntl, 0644) || die "can not tie segment.dat:".$!;
tie(%SEGMR, 'SDBM_File', $directory.'/segment.rev', $fcntl, 0644) || die "can not tie segment.dat:".$!;
tie(%COMPT, 'SDBM_File', $directory.'/composite.dat', $fcntl, 0644) || die "can not tie composite.dat:".$!;
tie(%ELEMT, 'SDBM_File', $directory.'/element.dat', $fcntl, 0644) || die "can not tie element.dat:".$!;
tie(%CODET, 'SDBM_File', $directory.'/codes.dat', $fcntl, 0644) || die "can not tie codes.dat:".$!;
$indent_join='';
$indent_tab='';
eval_xml_edifact_headers();
}
sub close_dbm {
untie(%SEGMT);
untie(%SEGMR);
untie(%COMPT);
untie(%ELEMT);
untie(%CODET);
}