NAME
Business::CUSIP::Random - Generate random CUSIP numbers for testing
SYNOPSIS
use Business::CUSIP::Random;
my $cusip;
$cusip = Business::CUSIP::Random->generate; # returns a Business::CUSIP object
# or...
$cusip = Business::CUSIP::Random->generate_string; # returns a string
DESCRIPTION
Generates a random CUSIP (Committee on Uniform Security Identification Procedures) number for use in testing.
METHODS
generate
generate_string
Returns a randomly-generated, valid CUSIP number.
generate() returns a Business::CUSIP object, while generate_string() returns a string.
Takes the following optional parameter as a hash:
fixed_income
If true, the CUSIP generated will follow the format defined for fixed-income securities.
rand_issuer_number
Returns a random CUSIP issuer number
Takes the following optional parameter as a hash:
fixed_income
If true, the issuer number generated will follow the format defined for fixed-income securities.
rand_issue_number
Generates a random CUSIP issue number.
Takes the following optional parameter as a hash:
fixed_income
If true, the issue number generated will follow the format defined for fixed-income securities.
DEPENDENCIES
Business::CUSIP
AUTHORS
Michael Aquilina <aquilina@cpan.org>
Grant Street Group <developers@grantstreet.com>
COPYRIGHT AND LICENSE
Copyright (C) 2011 Michael Aquilina.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.