Add commandline debug options
A debug level can now be passed to Ctypes using "--debug <num>"
on the command line.
The _debug() routine, which replaces all instances of "print $foo
if $Debug", is in Ctypes::Util, which has consequently been split
out into its own .pm file. I think this might help some ugly
cyclical dependencies which were present (although some may
remain).
The first argument to _debug is a number, the debug level of the
message. Messages <= the debug level passed at the command line
are displayed; e.g. "--debug 3" would output all debug messages
numbered 1, 2 or 3.
Most messages have been preliminarily set to debug level 5.
Messages notifying sub entry or exit are at 4.
I envision some time in the future adding the option of
displaying only debug messages from certain packages. API
suggestions welcome.
modified: MANIFEST
modified: lib/Ctypes.pm
modified: lib/Ctypes/Function.pm
modified: lib/Ctypes/Type.pm
modified: lib/Ctypes/Type/Array.pm
modified: lib/Ctypes/Type/Field.pm
modified: lib/Ctypes/Type/Simple.pm
modified: lib/Ctypes/Type/Struct.pm
new file: lib/Ctypes/Util.pm
modified: t/Simple.t
modified: t/Struct.t