#!/usr/bin/perl

eval 'exec /usr/bin/perl  -S $0 ${1+"$@"}'
    if 0; # not running under some shell

# cid2spf.pl - Converts a MS Caller-ID entry (XML) to a SPF entry
#
# (c) 2004 by Ernesto Baschny
#
# Usage:
#  ./cid2spf.pl "<ep xmlns='http://ms.net/1'>...</ep>"
#
# Read README for more info
#

use strict;
use warnings;

use XML::Parser;
use LMAP::CID2SPF qw(cid2spf);

if (scalar(@ARGV) == 0) {
	printf("Usage: %s \"<ep xmlns='http://ms.net/1'>...</ep>\"\n", $0);
	exit(1);
}

my $cid_xml = $ARGV[0];
print cid2spf($cid_xml) . "\n";

1;

