NAME

Business::SEDOL - Verify Stock Exchange Daily Official List Numbers

SYNOPSIS

use Business::SEDOL;
$sdl = Business::SEDOL->new('0325015');
print "Looks good.\n" if $sdl->is_valid;

$sdl = Business::SEDOL->new('0123457');
$chk = $sdl->check_digit;
$sdl->sedol($sdl->sedol.$chk);
print $sdl->is_valid ? "Looks good." : "Invalid: ", $sdl->error, "\n";

DESCRIPTION

This module verifies SEDOLs, which are British securities identification codes. This module cannot tell if a SEDOL references a real security, but it can tell you if the given SEDOL is properly formatted. It handles both the old-style SEDOLs (SEDOLs issued prior to 26 January 2004) and new-style SEDOLs.

METHODS

new([SEDOL_NUMBER])

The new constructor optionally takes the SEDOL number.

sedol([SEDOL_NUMBER])

If no argument is given to this method, it will return the current SEDOL number. If an argument is provided, it will set the SEDOL number and then return the SEDOL number.

series()

Returns the series number of the SEDOL.

is_valid()

Returns true if the checksum of the SEDOL is correct otherwise it returns false and $Business::SEDOL::ERROR will contain a description of the problem.

error()

If the SEDOL object is not valid (! is_valid()) it returns the reason it is not valid. Otherwise returns undef.

check_digit()

This method returns the checksum of the object. This method ignores the check digit of the object's SEDOL number instead recalculating the check_digit each time. If the check digit cannot be calculated, undef is returned and $Business::SEDOL::ERROR contains the reason.

AUTHOR

This module was written by Tim Ayers (http://search.cpan.org/search?author=TAYERS).

COPYRIGHT

Copyright (c) 2001 Tim Ayers. All rights reserved.

LICENSE

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