File: parse.pl

package info (click to toggle)
libdime-tools-perl 0.05-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, bullseye, forky, sid, trixie
  • size: 160 kB
  • sloc: perl: 763; makefile: 2
file content (22 lines) | stat: -rw-r--r-- 379 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
#!/usr/bin/perl

use IO::File;
use DIME::Message;
use DIME::Payload;
use DIME::Parser;

# Open a file a with a DIME message and parse it...

sub parse
{
my $parser = new DIME::Parser();
$f = new IO::File("dime.message","r");
my $message = $parser->parse($f);
$f->close();
for my $i ($message->payloads())
{
	print $i->print_content(\*STDOUT);
}
}

parse();