script/16.damaged.write.pm untested

filter: Statementstmt 0.0% 0 / 17 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 0.0% 0 / 2 Podpod 0.0% 0 / 1 totaltotal 0.0% 0 / 20 CC 1 SCAR 6.9
CC
1
Cov
0%
BEGIN
2.0
BEGIN
2.0
CRAP 2.0
1 #!/usr/local/bin/perl
2  
3 BEGIN{push @INC, "./../blib/lib/"}
4  
5 use Biblio::ILL::ISO::Damaged;
6  
7 #
8 # transaction-id
9 #
10 my $tid = new Biblio::ILL::ISO::TransactionId("PLS","001","",
11 new Biblio::ILL::ISO::SystemId("MWPL"));
12  
13 #
14 # service-date-time
15 #
16 my $sdt = new Biblio::ILL::ISO::ServiceDateTime( new Biblio::ILL::ISO::DateTime("20030623","114400"),
17 new Biblio::ILL::ISO::DateTime("20030623","114015")
18 );
19  
20 #
21 # requester-id
22 #
23 my $reqid = new Biblio::ILL::ISO::SystemId();
24 $reqid->set_person_name("David A. Christensen");
25  
26 #
27 # responder-id
28 #
29 my $resid = new Biblio::ILL::ISO::SystemId("MWPL");
30  
31 #
32 # damaged-details
33 #
34 # Unsupported. (At least, it is until I figure out the whole 'extensions' thing).
35  
36  
37  
38 #-------------------------------------------------------------------------------------------
39  
40 my $msg = new Biblio::ILL::ISO::Damaged();
41  
42 # Minimum required:
43 $msg->set_protocol_version_num("version-2");
44 $msg->set_transaction_id( $tid );
45 $msg->set_service_date_time( $sdt );
46  
47 # Extra, useful info:
48 $msg->set_requester_id( $reqid );
49 $msg->set_responder_id( $resid );
50 $msg->set_note("This is a note.");
51  
52 #
53 #print "\n-as_pretty_string------------------------------------\n";
54 #print $msg->as_pretty_string();
55 #print "\n-----------------------------------------------------\n";
56 #
57 #print "\n-debug(ans->as_asn())--------------------------------\n";
58 #my $href = $msg->as_asn();
59 #print $msg->debug($href);
60 #print "\n-----------------------------------------------------\n";
61 #
62 #$msg->encode();
63 #
64  
65 #print "\n-write-----------------------------------------------\n";
66 $msg->write("msg_16.damaged.ber");
67 #print "\n-----------------------------------------------------\n";
68  
69 #print "---end---\n";
70