#!/usr/bin/perl

use strict;
use warnings;
use Net::SMS::Optimus;

my $username = shift or usage();
my $password = shift or usage();
my $numbers  = shift or usage();
my $msg      = shift or usage();

# Try to split the numbers
my @numbers = split /\|/, $numbers;

send_sms($username, $password, \@numbers, $msg);

sub usage {
    print <<EOF;
sms_optimus "username" "password" "931234567|937654321" "msg"

The numbers are separated by the pipe. Maximum 3 numbers.
The message should not be larger than 152 characters.

EOF
    exit(1);
}

=head1 NAME

sms_optimus - Command Line interface to Net::SMS::Optimus

=head1 USAGE

Please run the script without parameters to see the usage.. I like DRY :)

=cut


