NAME
Auction::Lot - Information on an item in an auction
SYNOPSIS
my $a_item = Auction::Lot->new($itemid);
my $itemid = $a_item->itemid;
my $id = $a_item->id;
my $reserve = $a_item->reserve;
my $description = $a_item->description;
my $expiry_day = $a_item->expiry_day;
my $expiry_time = $a_item->expiry_time;
my @time_left = $a_item->time_remaining;
DESCRIPTION
This provides information on an item in an auction
YOU HAVE TO GET YOURSELF A DATABASE HANDLE!! I don't know how you connect to your database, so I leave that for an exercise for the reader.
Oh, alright, here is an example... Auction::Lot->set_db('Main', 'dbi:mysql', 'me', 'noneofyourgoddamnedbusiness', {AutoCommit => 1}); my @handles = Auction::Lot->db_handles; my $dbh = $handles[0];
FACTORY METHODS
new
my $a_item = Auction::Lot->new($itemid);
Make a new auction item object
INSTANCE METHODS
itemid
my $itemid = $a_item->itemid;
This will return the itemid
description
my $description = $a_item->description;
This will return the item's description
reserve
my $reserve = $a_item->reserve
This will return the item's reserve.
id
my $id = $a_item->id;
This is synomous with itemid
expiry_day
my $expiry_day = $a_item->expiry_day;
This will return the day of expiry as a Date::Simple;
expiry_time
my $expiry_time = $a_item->expiry_time;
This will return the time of expiry of the auction (on the expiry_date)
time_remaining
my @time_remaining = $a_item->time_remaining.
This will return a list (days, hours, minutes, seconds) of the time remaining until the end of the auction.
is_active
my $is_active = $a_item->is_active;
This will be true is the item is still auctionable, that is, that the expiry date of the auction hasn't passed.
BUGS
None known
TODO
Nothing known
COPYRIGHT
Copyright (C) 2001 mwk. All rights reserved.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
MWKerr, <coder@stray-toaster.co.uk>