C-Scan-Constants

 view release on metacpan or  search on metacpan

lib/C/Scan/Constants.pm  view on Meta::CPAN


=back

=head2 write_constants_module( $pkg_name, @c_constants )

=over

Writes a Constants/C/Symbols.pm submodule into the
invoking Makefile.PL module's namespace.  Really just a value-added
wrapper around ExtUtils::Constant::WriteConstants().

No return value -- call for side-effects only.

=back

=head1 DIAGNOSTICS

TBD.  I owe you a list of error and warning messages you might see
when invoking functions from C::Scan::Constants.

=head1 CONFIGURATION AND ENVIRONMENT

TBD.  If/when populated, this section will describe
in detail how/where to add the
necessary extra code to wire in the autogenerated files to your
module.  It will also describe what you need in your Makefile.PL
to assure that the autogenerated stuff goes away at C<make clean>
time.

For the time being, write_constants_module() outputs to STDERR
a number of hints that should provide the needed answers to these
types of questions.

=head1 DEPENDENCIES

For the program proper:

=over 4

Carp, Data::Flow, ExtUtils::Constants,
ModPerl::CScan, C::Scan, File::Temp, File::Copy,
File::Spec, File::Path, Exporter

=back

Additional modules needed for tests (over and above Test::More):

=over 4

Scalar::Util, List::MoreUtils, Cwd

=back

=head1 COMPATIBILITY NOTES

This version of C::Scan::Constants is known to work with
ExtUtil::Constants versions 0.14 - 0.16.  It may not work
properly with earlier or later versions.  I welcome your comments
and patches to assure continued compatibility going forward.

=head1 BUGS AND LIMITATIONS

The amount of code you are currently required to add to your module
to make use of the files C::Scan::Constants generates seems rather
too much.  It would be highly useful to provide a more streamlined
usage, or to provide scripts that would assist you in inserting the
needed code into your module.

Also, the tests are incomplete.  The runtime usability of constants
generated by the module is not tested at all.  I need to set up some
tests that actually create a new module, invoke the C::Scan::Constants
functionality, and then do a

    perl Makefile.PL
    make
    make test

regimen on that module in order to accomplish this.   That's pretty
tricky, so I haven't tackled it yet.

Finally (well probably not), it would be nice to be able to specify
whether B<cpp> should "follow" C<#include> statements in C header files.
Sometimes, that's what you really want.  This version of
C::Scan::Constants suppresses all such "following" behavior.

Other than that, there are no known bugs in this module.

Please report problems to Philip Monsen (philip.monsen@gmail.com).
Patches are especially welcome.

=head1 AUTHOR

Philip Monsen (philip.monsen@gmail.com)

=head1 COPYRIGHT AND LICENSE

I<ModPerl::CScan>

ModPerl::CScan is provided with this module for convenience for those
users who do not wish to install mod_perl as a whole.  This version
is 0.75 from the mod_perl-2.0.1 distro.

Copyright (C) 2005 by Doug MacEachern.

Licensed under the Apache License, Version 2.0; you may not
use this file except in compliance with the License.  A current
copy of the license is available at

     http://www.apache.org/licenses/LICENSE-2.0

See also contrib/LICENSE for a Jan. 2004 copy of the license text.

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied.  See the License for the specific language governing
permissions and limitations under the License.


I<All else>



( run in 1.509 second using v1.01-cache-2.11-cpan-39bf76dae61 )