DBD::ADO::ConstDBD::ADO::Const is a Perl module for ADO Constants. | |
Download |
DBD::ADO::Const Ranking & Summary
Advertisement
- License:
- Perl Artistic License
- Price:
- FREE
- Publisher Name:
- Steffen Goeldner
- Publisher web site:
- http://search.cpan.org/~sgoeldner/Font-FNT-0.02/FNT.pm
DBD::ADO::Const Tags
DBD::ADO::Const Description
DBD::ADO::Const is a Perl module for ADO Constants. DBD::ADO::Const is a Perl module for ADO Constants.SYNOPSIS use DBD::ADO::Const(); $ = "n"; my $Enums = DBD::ADO::Const->Enums; for my $Enum ( sort keys %$Enums ) { print $Enum; for my $Const ( sort keys %{$Enums->{$Enum}} ) { printf " %-35s 0x%Xn", $Const, $Enums->{$Enum}{$Const}; } }In the OLE type library, many constants are defined as members of enums. It's easy to lookup DBD::ADO constants by name, e.g.: $ado_consts->{adChar} == 129Unfortunately, Win32::OLE::Const does not preserve the namespace of the enums. It's a matter of taste, but I think $ado_consts->{DataTypeEnum}{adChar} == 129makes the code more self-documenting.Furthermore, many DBD::ADO methods return numeric codes. Transforming these codes into human readable strings requires an inverse lookup by value. Building the reverse hash for e.g. all datatypes requires that datatype constants can be distinguished from other constants, i.e. we need the namespace preserved.The Enums() method of this package return a hash of hashes for exactly this purpose. Requirements: · Perl
DBD::ADO::Const Related Software