Business::CUSIP::Random - Generate random CUSIP numbers for testing
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
Generates a random CUSIP (Committee on Uniform Security Identification Procedures) number for use in testing.
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.
Returns a random CUSIP issuer number
If true, the issuer number generated will follow the format defined for fixed-income securities.
Generates a random CUSIP issue number.
If true, the issue number generated will follow the format defined for fixed-income securities.
Business::CUSIP
Michael Aquilina <aquilina@cpan.org>
Grant Street Group <developers@grantstreet.com>
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.
To install Business::CUSIP::Random, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Business::CUSIP::Random
CPAN shell
perl -MCPAN -e shell install Business::CUSIP::Random
For more information on module installation, please visit the detailed CPAN module installation guide.