NAME
WWW::FleXtel - Manipulate FleXtel phone number redirection
SYNOPSIS
use strict;
use WWW::FleXtel qw();
use Data::Dumper qw(Dumper);
my $flextel = WWW::FleXtel->new(
number => "0701776655",
pin => "1234",
account => "A99999",
password => "password",
);
printf("Diverted to %s\n", $flextel->get_destination);
$flextel->set_destination(destination => "01923001122");
printf("Diverted to %s\n", $flextel->get_destination);
print Dumper($flextel->get_phonebook);
DESCRIPTION
This module provides a very basic OO interface to FleXtel telephone number redirection webpage.
METHODS
new
my $flextel = WWW::FleXtel->new(
number => "0701776655",
pin => "1234",
account => "A99999",
password => "password",
);
Create a new WWW::FleXtel object. Currently the account and password parameters are unsed and therefor do not need to be passed to this constructor method.
This method does have any mandatory parameters. However values passed this constructor method will be used as default fallback values if they are not passed to the subsequent accessor methods detailed below.
get_destination
my $destination = $flextel->get_destination;
print "Diverted to $destination\n";
Retrieves the destination telephone number that your FleXtel number is currently diverted to.
set_destination
my $destination = $flextel->set_destination(destination => "01923001122");
print "Diverted to $destination\n";
Sets the destination telephone number that your FleXtel number is diverted to.
get_phonebook
my $phonebook = $flextel->get_phonebook;
use Data::Dumper qw(Dumper);
print Dumper($phonebook);
my $destination = $flextel->get_destination;
my ($person) = grep(/\S/, map {
$_->{title} if defined $_ && $_->{number} eq $destination
} @{$phonebook}) || "*not recorded*";
print "$destination is $person in your phonebook\n";
This method extracts the indexes, names and numbers from your FleXtel number's phonebook. This method has the potential to stop working in the future since it gathers the information by performing very basic parsing of the JavaScript object assignments on your FleXtel number's rerouting webpage.
get_email
my $notification_address = $flextel->get_email;
SEE ALSO
VERSION
$Id: DMIDecode.pm 809 2006-10-22 12:47:45Z nicolaw $
AUTHOR
Nicola Worthington <nicolaw@cpan.org>
If you like this software, why not show your appreciation by sending the author something nice from her Amazon wishlist? ( http://www.amazon.co.uk/gp/registry/1VZXC59ESWYK0?sort=priority )
COPYRIGHT
Copyright 2007 Nicola Worthington.
This software is licensed under The Apache Software License, Version 2.0.