NAME

Data::BT::PhoneBill - Parse a BT Phone Bill from their web site

SYNOPSIS

my $bill = Data::BT::PhoneBill->new($filename);

while (my $call = $bill->next_call) {
  print $call->date, $call->time, $call->destination,
        $call->number, $call->duration, $call->cost;
  }
}

DESCRIPTION

This module provides an interface for querying your BT phone bill, as produced from their "View My Bill" service at www.bt.com

You should use their "Download Calls" option to save your bill as a CSV file, and then feed it to this module.

CONSTRUCTOR

new

my $bill = Data::BT::PhoneBill->new($filename);

Parses the bill stored in $filename.

FETCHING DATA

while (my $call = $bill->next_call) {
  print $call->date, $call->time, $call->destination,
        $call->number, $call->duration, $call->cost;
  }
}

Each time you call $bill->next_call it will return a Data::BT::PhoneBill::Call object representing a telephone call (or false when there are no more to read)

Each Call object has the following methods defined:

date

A Date::Simple object represeting the date of the call.

time

A string representing the time of the call in the 24-hr format 'hh:mm'.

destination

A string that for local and national calls this will usually be the town. However this can also contain things like "Premium Rate", "Local Rate" etc for 'non-geogrpahic' calls.

number

A string representing the telephone number dialled, formatted as it appears on the bill.

duration

The length of the call in seconds.

cost

The cost of the call, before any discounts are applied, in pence.

FEEDBACK

If you find this module useful, or have any comments, suggestions or improvements, please let me know.

AUTHOR

Tony Bowden, <kasei@tmtm.com>.

COPYRIGHT

Copyright (C) 2001 Tony Bowden. All rights reserved.

This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself.