NAME
Data::SIprefixes::nano - This provides micro matching for Data::SIprefixes.
VERSION
Version 0.0.0
SYNOPSIS
my
$prefix
=Data::SIprefixes::nano->new;
my
$origMeasure
=
'nanometer'
;
my
$measure
=
$prefix
->longMatch(
$origMeasure
);
my
$long
;
if
(
$prefix
->error ){
warn
(
'error:'
.
$prefix
->error.
': '
.
$prefix
->errorString);
}elseif( !
defined
(
$measure
) ){
$measure
=
$prefix
->shortMatch(
$origMeasure
);
}
else
{
$long
=1;
}
METHODS
new
This initiates the object.
my
$prefix
=
$Data::SIprefixes::nano
->new;
fromBase
Returns the number needed to to multiple it by to get from the unprefixed measure to the prefixed measure.
my
$fromBase
=
$prefix
->fromBase;
longMatch
Matches long SI prefixed measures.
A match returns the measure with out the SI prefix, which will be '' if no measure is specified.
my
$measure
=
$prefix
->longMatch(
$origMeasure
);
if
(
$prefix
->error ){
warn
(
'error:'
.
$foo
->error.
': '
.
$foo
->errorString);
}
shortMatch
Matches short SI prefixed measures.
A match returns the measure with out the SI prefix, which will be '' if no measure is specified.
my
$measure
=
$prefix
->longMatch(
$origMeasure
);
if
(
$prefix
->error ){
warn
(
'error:'
.
$foo
->error.
': '
.
$foo
->errorString);
}
symbol
This returns the symbol for the prefix.
my
$symbol
=
$prefix
->symbol;
toBase
Returns the number needed to to multiple it by to get from the prefixed measure number to the unprefixed measure.
my
$toBase
=
$prefix
->toBase;
ERROR CODES
1
Nothing passed for a measure.
2
Space found after prefix.
AUTHOR
Zane C. Bowers-Hadley, <vvelox at vvelox.net>
BUGS
Please report any bugs or feature requests to bug-data-siprefixes at rt.cpan.org
, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Data-SIprefixes. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc Data::SIprefixes::nano
You can also look for information at:
RT: CPAN's request tracker (report bugs here)
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2012 Zane C. Bowers-Hadley.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.