James E. Keenan [Sun, 11 Apr 2010 20:48:23 +0000 (16:48 -0400)]
Mostly adding tests and documentation.
Rename sub print_preprocessor_statements() to
analyze_preprocessor_statements(). Modify interface to map_type() and
re-work tests as needed. Wrote documentation in Utilities.pm for
process_single_typemap(), map_type(), standard_XS_defs(),
assign_func_args(), analyze_preprocessor_statements(). Write tests
in t/109-standard_XS_defs.t, t/110-assign_func_args.t.
James E. Keenan [Sun, 11 Apr 2010 17:52:39 +0000 (13:52 -0400)]
Move several functions to Utilities.pm
Namely: check_conditional_preprocessor_statements(), Warn(),
blurt() and death() to Utilities.pm.
Add file to test blurt, death and Warn. (death() is not
really testable yet due to hard-coded 'exit'.) ovid++, rjbs++,
xdg+++ for assistance in developing tests."
James E. Keenan [Sun, 11 Apr 2010 14:35:40 +0000 (10:35 -0400)]
Change check_cpp() to check_conditional_preprocessor_statements()
... to be more self-documenting.
Also: Explicitly pass $self to Warn(), blurt() and death().
Add skeletons of files to test functions moved (or planned to be
moved) to Utilities.pm.
James E. Keenan [Sat, 10 Apr 2010 14:24:00 +0000 (10:24 -0400)]
Was able to move $Packid into $self.
Note that I got build failures when I attempted to pull $Package into $self.
The distributions below because during various 'eval EXPR'
statements, I got a 'Global variable $Package ...' error.
cut -d '/' -f 7,8,9,10,11 research/problematic.builds.
20100410.txt
D/DB/DBURDICK/BoostGraph/Boost-Graph-1.4.tar.gz
D/DE/DEEMON/Crypt-OpenSSL-SMIME-0.02.tar.gz
D/DL/DLOWE/Text-Tmpl-0.33.tar.gz
D/DM/DMAKI/Data-Valve-0.00010.tar.gz
D/DO/DORMANDO/Perlbal-XS-HTTPHeaders-0.20.tar.gz
E/ED/EDPRATOMO/Algorithm-Permute-0.12.tar.gz
J/JH/JHI/String-Approx-3.26.tar.gz
K/KA/KARMAN/Search-Tools-0.45.tar.gz
K/KI/KILINRAX/HTML-Strip-1.06.tar.gz
L/LA/LAIRDM/Algorithm-SVM-0.13.tar.gz
M/MA/MARKSMITH/HTTP-HeaderParser-XS-0.20.tar.gz
M/MC/MCEGLOWS/Search-ContextGraph-0.15.tar.gz
M/MH/MHX/Convert-Binary-C-0.74.tar.gz
M/MH/MHX/Tie-Hash-Indexed-0.05.tar.gz
M/MI/MIKEWONG/Table-ParentChild-0.05.tar.gz
M/MS/MSERGEANT/CDB_File-0.96.tar.gz
M/MS/MSERGEANT/IO-KQueue-0.34.tar.gz
P/PA/PAJAS/XML-LibXML-1.70.tar.gz
P/PM/PMQS/Filter-1.37.tar.gz
S/SA/SALVA/Compress-PPMd-0.11.tar.gz
S/SA/SAPER/Net-Pcap-0.16.tar.gz
S/SA/SAPER/Net-RawIP-0.25.tar.gz
S/SG/SGOELDNER/MonetDB-CLI-MapiXS-0.03.tar.gz
S/SM/SMUELLER/Math-SymbolicX-FastEvaluator-0.01.tar.gz
S/SM/SMUELLER/Parse-ExuberantCTags-1.01.tar.gz
S/SP/SPIDB/Net-ext-1.011.tar.gz
T/TJ/TJMATHER/Crypt-OpenSSL-DSA-0.13.tar.gz
James E. Keenan [Sat, 10 Apr 2010 13:24:33 +0000 (09:24 -0400)]
Refactor some code into sub set_cond()
Eliminate instances of calling subs with '&'.
James E. Keenan [Sat, 10 Apr 2010 12:56:06 +0000 (08:56 -0400)]
Add vim modeline entries.
James E. Keenan [Sat, 10 Apr 2010 01:42:30 +0000 (21:42 -0400)]
Move sub print_preprocessor_statements() into Utilities.pm.
James E. Keenan [Sat, 10 Apr 2010 01:38:57 +0000 (21:38 -0400)]
Refactor some code into sub assign_func_args().
James E. Keenan [Fri, 9 Apr 2010 03:02:50 +0000 (23:02 -0400)]
Don't have to undef if it's never been assigned to.
James E. Keenan [Fri, 9 Apr 2010 02:16:04 +0000 (22:16 -0400)]
Move several variables found inside the PARAGRAPH loop
... closer to the point where each is first used.
James E. Keenan [Fri, 9 Apr 2010 01:04:51 +0000 (21:04 -0400)]
Move $orig_args closer to where it's used
James E. Keenan [Fri, 9 Apr 2010 00:39:05 +0000 (20:39 -0400)]
Move $prepush_done closer to where it's used
James E. Keenan [Thu, 8 Apr 2010 12:18:14 +0000 (08:18 -0400)]
Move $func_header inside while loop closer to where it's used
James E. Keenan [Tue, 6 Apr 2010 23:46:54 +0000 (19:46 -0400)]
Move two heredocs into Utilities::standard_XS_defs().
James E. Keenan [Sun, 4 Apr 2010 13:37:17 +0000 (09:37 -0400)]
Change @outlist and %only_C_inlist into corresponding references
... in anticipation of upcoming refactorings,
James E. Keenan [Sun, 4 Apr 2010 13:10:06 +0000 (09:10 -0400)]
Add messages to 3 tests which lacked them.
James E. Keenan [Sat, 3 Apr 2010 22:23:45 +0000 (18:23 -0400)]
Move 4 elements in %args into $self
It was not yet possible to move $args{'s'} into $self because
of a quotemeta problem.
James E. Keenan [Sat, 3 Apr 2010 21:05:07 +0000 (17:05 -0400)]
No evident need for 'for' loop in assignment from $args{filename}.
James E. Keenan [Sat, 3 Apr 2010 21:00:31 +0000 (17:00 -0400)]
Explicitly pass $self to check_cpp()
Also explicitly return $self from print_preprocessor_statements().
James E. Keenan [Sat, 3 Apr 2010 19:00:02 +0000 (15:00 -0400)]
Refactor code inside process_file() into print_preprocessor_statements()
James E. Keenan [Sat, 3 Apr 2010 14:00:52 +0000 (10:00 -0400)]
Change \@BootCode to $BootCode_ref
to facilitate more refactoring of code into (somewhat) encapsulated
subs.
James E. Keenan [Sat, 3 Apr 2010 13:25:55 +0000 (09:25 -0400)]
Eliminate some synthetic variables
and move declarations of some lexicals closer to the point where
they are actually used.
James E. Keenan [Sat, 3 Apr 2010 13:05:13 +0000 (09:05 -0400)]
Typographical cleanup
Mostly elimination of trailing whitespace.
James E. Keenan [Sat, 3 Apr 2010 02:39:15 +0000 (22:39 -0400)]
Add $newXS to $self
Keeping fingers crossed!
James E. Keenan [Thu, 1 Apr 2010 12:20:02 +0000 (08:20 -0400)]
Move $proto into $self;
James E. Keenan [Thu, 1 Apr 2010 11:08:35 +0000 (07:08 -0400)]
Add $Module_cname to $self.
James E. Keenan [Thu, 1 Apr 2010 02:48:28 +0000 (22:48 -0400)]
Move %defaults to $self.
James E. Keenan [Thu, 1 Apr 2010 01:55:17 +0000 (21:55 -0400)]
Move @line to $self.
James E. Keenan [Wed, 31 Mar 2010 23:37:04 +0000 (19:37 -0400)]
Move @line_no, @Attributes, %outargs, @XSStack to $self.
James E. Keenan [Wed, 31 Mar 2010 03:10:30 +0000 (23:10 -0400)]
Move %lengthof, %XsubAliases, %XsubAliasValues, %Interfaces.
To do: Eliminate confusion between these attributes: interface
(scalar) interfaces (scalar) Interfaces (hash)
James E. Keenan [Wed, 31 Mar 2010 02:23:02 +0000 (22:23 -0400)]
Add \%in_out and \%argtype_seen to $self.
James E. Keenan [Wed, 31 Mar 2010 00:47:51 +0000 (20:47 -0400)]
Move 9 'our' hashes and arrays into $self
For now, bypassing \@line, \%defaults.
James E. Keenan [Tue, 30 Mar 2010 22:45:21 +0000 (18:45 -0400)]
Move $var_num into $self.
Write inline comment explaining current status of 'our' variables.
James E. Keenan [Tue, 30 Mar 2010 12:34:02 +0000 (08:34 -0400)]
Move $Interfaces into $self, but as $self->{interfaces}
... to avoid confusion with %Interfaces. (But note we already have
$self->{interface}. This will have to be fixed.)
James E. Keenan [Tue, 30 Mar 2010 12:07:29 +0000 (08:07 -0400)]
Move $DoSetMagic, $XsubAliases, into $self.
The latter is called 'xsubaliases', the change of casing
anticipating confusion with %XsubAliases.
James E. Keenan [Mon, 29 Mar 2010 02:11:33 +0000 (22:11 -0400)]
Tidy up lists of 'our' variables.
James E. Keenan [Mon, 29 Mar 2010 02:07:45 +0000 (22:07 -0400)]
Move $condnum, $cond, into $self. $ALIAS ran into eval EXPR problems.
James E. Keenan [Mon, 29 Mar 2010 01:39:49 +0000 (21:39 -0400)]
Move $func_args into $self.
James E. Keenan [Mon, 29 Mar 2010 01:22:23 +0000 (21:22 -0400)]
Move $RETVAL_code into $self.
James E. Keenan [Mon, 29 Mar 2010 00:35:36 +0000 (20:35 -0400)]
Move $gotRETVAL into $self.
James E. Keenan [Mon, 29 Mar 2010 00:23:56 +0000 (20:23 -0400)]
Move $deferred into $self.
James E. Keenan [Sun, 28 Mar 2010 17:31:29 +0000 (13:31 -0400)]
Eliminate 'our' $printed_name
Replace it with a 'my' variable declared inside INPUT_handler().
Permissible, because $printed_name is explicitly passed to subs
called from within INPUT_handler() and only there.
James E. Keenan [Sun, 28 Mar 2010 17:21:47 +0000 (13:21 -0400)]
Move $thisdone and $retvaldone to $self.
James E. Keenan [Sun, 28 Mar 2010 17:02:34 +0000 (13:02 -0400)]
Add $Packprefix to $self.
James E. Keenan [Sun, 28 Mar 2010 02:40:53 +0000 (22:40 -0400)]
Move $ret_type into $self.
$pname posed interpolation problems.
James E. Keenan [Sun, 28 Mar 2010 02:28:11 +0000 (22:28 -0400)]
More globals in $self
Move $Prefix, $processing_arg_with_types, $proto_in_this_xsub,
$scope_in_this_xsub, $interface, $interface_macro,
$interface_macro_set, $ProtoThisXSUB, $ScopeThisXSUB into $self.
James E. Keenan [Sat, 27 Mar 2010 22:22:13 +0000 (18:22 -0400)]
Move more globals into the global $self
Move $proto_re, $Overload, $errors, $Fallback, $hiertype,
$WantPrototypes, $WantVersionChk, $WantLineNumbers,
$filepathname, $dir, $filename, $BLOCK_re, $lastline, $lastline_no
into $self. $proto_re not used within ParseXS.pm, so remove it.
$FH did not play well with $self inside angle-bracket operator
(while loop). $Package could not be transformed either, probably
due to problems in its usage as ${Package} inside HEREdocs.
James E. Keenan [Sat, 27 Mar 2010 16:47:16 +0000 (12:47 -0400)]
Declare global instance as a stepping stone to an OO ExtUtils::ParseXS
Declare 'our' variable $self and move the first package global ($ProtoUsed) into it.
James E. Keenan [Sun, 6 Feb 2011 14:39:06 +0000 (15:39 +0100)]
More and better tests
Provide messages for some tests in 001-basic.t. Add file
t/004-nolinenumbers.t to test case where line numbers are not
requested.
James E. Keenan [Sat, 27 Mar 2010 02:44:35 +0000 (22:44 -0400)]
Eliminate sub ProtoString(), which was used in only one location.
James E. Keenan [Sat, 27 Mar 2010 02:24:15 +0000 (22:24 -0400)]
Move list of XS keywords to Constants.pm.
James E. Keenan [Sat, 27 Mar 2010 02:07:21 +0000 (22:07 -0400)]
Remove the wistful comment about "use strict -- one of these days ..."
That day has come!
James E. Keenan [Sat, 27 Mar 2010 02:05:49 +0000 (22:05 -0400)]
Change name of sub errors() to sub report_error_count()
... to distinguish it better from 'our' variable $errors.
Adjust t/002-more.t and lib/ExtUtils/xsubpp accordingly.
James E. Keenan [Sat, 27 Mar 2010 01:24:07 +0000 (21:24 -0400)]
Indentation fix
James E. Keenan [Sat, 27 Mar 2010 00:57:51 +0000 (20:57 -0400)]
Change arguments to output_init() to single hashref
Also move definitions of some utility subs to end of file.
Since we don't yet have a way around the 'eval EXPR' problem. We'll have to
de-reference that hashref once inside the sub.
James E. Keenan [Fri, 26 Mar 2010 23:24:29 +0000 (19:24 -0400)]
Change arguments to generate_init() to single hashref.
Since we don't yet have a way around the 'eval EXPR' problem. We'll have to
de-reference that hashref once inside the sub.
James E. Keenan [Sun, 21 Mar 2010 14:52:31 +0000 (10:52 -0400)]
Inline comment about difficulties which 'eval qq()' will pose
James E. Keenan [Sun, 21 Mar 2010 14:04:56 +0000 (10:04 -0400)]
Typographical cleanup only.
James E. Keenan [Sun, 6 Feb 2011 11:07:15 +0000 (12:07 +0100)]
Improve test coverage, extract function for better testing
Add files to test EU::PXS::Utilities::map_type(), valid_proto_string(),
process_typemaps(). Extract code for processing a single typemap file
into its own sub, thereby permitting more focused testing. Eliminate some
unreachable branches and conditions in process_typemaps().
On the basis of coverage analysis, eliminate unreachable code.
Reformat some code for readability (shorter line length).
James E. Keenan [Sat, 20 Mar 2010 18:20:29 +0000 (14:20 -0400)]
Explicitly pass $hiertype to map_type()
Also adjust all (3) calls to map_type() to suit. We can do this
because $hiertype is read, but not written to, within map_type().
map_type() is now fully encapsulated and can be extracted from the
main package and placed in EU::PXS::Utilities.
James E. Keenan [Sat, 20 Mar 2010 17:30:08 +0000 (13:30 -0400)]
Eliminate last 'local' variables.
In two cases, guarantee that generate_init() is explicitly passed
all 4 arguments. With this commit, ExtUtils::ParseXS for the first
time ever runs completely under 'use strict;'.
James E. Keenan [Sat, 20 Mar 2010 15:48:41 +0000 (11:48 -0400)]
More variable scope fixes
Eliminate last instances of $name. Eliminate the debugging
messages I was using to detect $name and its effects. Begin to
replace the 'local' variables in 3 subroutines, as these are
the final remaining obstacles to use strict.
James E. Keenan [Sat, 20 Mar 2010 11:49:30 +0000 (07:49 -0400)]
Refine debugging messages to only identify CRITICAL messages.
James E. Keenan [Fri, 19 Mar 2010 12:15:32 +0000 (08:15 -0400)]
STDERR debugging messages around the last suspected '' global variables.
James E. Keenan [Mon, 15 Mar 2010 23:38:27 +0000 (19:38 -0400)]
Rename $name_printed to $printed_name
... so that it's better distinguished from instances of $name.
James E. Keenan [Mon, 15 Mar 2010 23:35:34 +0000 (19:35 -0400)]
Rename two more instances of '$name'.
James E. Keenan [Mon, 15 Mar 2010 23:07:30 +0000 (19:07 -0400)]
Reclassify approx 7 variables as either 'our' or 'my'.
Thanks to dagolden for diagnosis of problem with 'our' variables.
James E. Keenan [Mon, 15 Mar 2010 01:55:03 +0000 (21:55 -0400)]
Add a little POD
James E. Keenan [Mon, 15 Mar 2010 01:36:33 +0000 (21:36 -0400)]
More variable renaming and comments
1. Rename another instance of $name to $iface_name to further reduce
confusion.
2. Write inline comments at two locations where $name appears to be
previously undeclared global.
3. Correct some indentation.
James E. Keenan [Mon, 15 Mar 2010 01:27:27 +0000 (21:27 -0400)]
More variable and code shuffling to improve maintainability
1. Move creation of read filehandle closer to its first point of use.
2. Move code for population of %targetable into subroutine and place that sub,
make_targetable, in EU::PXS::Utilities (for the time being).
3. Rename one instance of $name to $len_name to (start to) reduce confusion.
Note: Munged by Steffen to fix problem with order of chdir() and open()
calls.
James E. Keenan [Sun, 14 Mar 2010 15:50:06 +0000 (11:50 -0400)]
Move code handling processing of typemap files to Utilities.pm.
James E. Keenan [Sun, 14 Mar 2010 14:39:48 +0000 (10:39 -0400)]
Change $ALIAS from 'my' to 'our'
This is not because I think it really should be changed but because
declaring it as 'my' produces change in resulting C code -- albeit
probably a desirable change. Include summary of debugging as inline
comment.
James E. Keenan [Sun, 6 Feb 2011 10:53:59 +0000 (11:53 +0100)]
Change ValidProtoString() to valid_proto_string()
and move its definition to Utilities.pm
James E. Keenan [Sun, 14 Mar 2010 04:13:50 +0000 (23:13 -0500)]
Revise some of the placements into EU::PXS::Constants.
James E. Keenan [Sun, 14 Mar 2010 03:02:23 +0000 (22:02 -0500)]
Shuffle more functions and variables around
Move sub C_string() to Utilities.pm. Eliminate some 'my' variables
inside process_file() that can be handled equally well by %args elements.
James E. Keenan [Sun, 6 Feb 2011 10:49:34 +0000 (11:49 +0100)]
Move EU::ParseXS::CountLines to its own file to simplify editing
James E. Keenan [Sat, 13 Mar 2010 17:41:29 +0000 (12:41 -0500)]
Implement use strict 'subs' and 'refs'
With two understandable exceptions for use strict 'refs'.
James E. Keenan [Sat, 13 Mar 2010 15:31:15 +0000 (10:31 -0500)]
Correct ambiguous regex capture syntax.
James E. Keenan [Sat, 13 Mar 2010 14:24:51 +0000 (09:24 -0500)]
Tighten scope of more variables
Move $pname from global to 'our'. Move $clean_func_name from global
to 'my'. Declare our $bal in separate statement.
James E. Keenan [Sat, 13 Mar 2010 04:40:45 +0000 (23:40 -0500)]
Move about 9 global variables into 'our' status.
James E. Keenan [Sat, 13 Mar 2010 03:41:02 +0000 (22:41 -0500)]
Lexicalize more variables
Move 6 more variables out of 'our' status and into 'my' status
inside process_file().
James E. Keenan [Sat, 13 Mar 2010 03:20:07 +0000 (22:20 -0500)]
Continue renaming confusing variables
Remove an unused variable called $line_no (which should reduce
confusion with @line_no). Rename another $line_no within
Warn() to $warn_line_number. %targetable becomes 'my' variable
inside subroutine.
James E. Keenan [Sat, 13 Mar 2010 03:00:57 +0000 (22:00 -0500)]
EU::ParseXS Version bump
Also nuke one more unused variable and fix a typo.
James E. Keenan [Sat, 13 Mar 2010 02:40:26 +0000 (21:40 -0500)]
Start to remove unused variables
Also identify 'our' variables which are used only within the scope of
process_file() and which therefore can be changed into 'my' variables.
James E. Keenan [Sun, 6 Feb 2011 10:38:11 +0000 (11:38 +0100)]
Move TidyType() to Utilities::tidy_type()
Create test file for it.
James E. Keenan [Sun, 6 Feb 2011 10:34:31 +0000 (11:34 +0100)]
Change TrimWhitespace() to trim_whitespace()
and place it in ParseXS::Utilities. Write a file to test it.
Update MANIFEST.
Steffen Mueller [Sun, 6 Feb 2011 10:31:06 +0000 (11:31 +0100)]
Move POD for internal sub from ParseXS.pod to Utilities.pm
Create file to test standard_typemap_locations().
Update MANIFEST.
Steffen Mueller [Sun, 6 Feb 2011 10:19:58 +0000 (11:19 +0100)]
Separate POD file and ExtUtils::ParseXS::Utilities
Create separate file to hold POD and introduce
ExtUtils::ParseXS::Utilities to hold non-object-oriented functions
refactored out of ExtUtils::ParseXS; first instance:
standard_typemap_locations().
James E. Keenan [Fri, 12 Mar 2010 02:54:57 +0000 (21:54 -0500)]
Continue tidying up the code, range lines 1000-end
Uncuddle all '} elsif' and '} else' statements.
Switch to 'use Exporter' rather than 'require' (for consistency).
James E. Keenan [Fri, 12 Mar 2010 02:13:10 +0000 (21:13 -0500)]
Change from 'use vars' to 'our', which was introduced in Perl 5.6.0.
James E. Keenan [Wed, 10 Mar 2010 03:49:17 +0000 (22:49 -0500)]
Begin to uncuddle 'elsif' and 'else'. Rationalize indentation. Completed thru line 1000.
James E. Keenan [Wed, 10 Mar 2010 03:21:07 +0000 (22:21 -0500)]
Eliminate whitespace before final semicolon.
James E. Keenan [Wed, 10 Mar 2010 03:16:18 +0000 (22:16 -0500)]
Change all hard tabs to 4-spaces. Eliminate trailing whitespace.
Steffen Mueller [Sun, 6 Feb 2011 10:09:01 +0000 (11:09 +0100)]
Rename EU::PXS test files to include digits
Steffen Mueller [Sun, 6 Feb 2011 16:57:21 +0000 (17:57 +0100)]
Revert "Moved prototype check to XS code, allowing the .pm file change from yesterday"
This reverts commit
d16d4b10300b35e2d4d858a3e23cff975bc713fe. It
requires the _ prototype support in ExtUtils::ParseXS and we need to
temporarily disable that. Will be reapplied later.
Steffen Mueller [Sun, 6 Feb 2011 10:05:22 +0000 (11:05 +0100)]
Revert EU::ParseXS part of
1e8125c621275d18c74bc8dae3bfc3c03929fe1e
This is in order to be able to apply Jim Keenan's work on
ExtUtils::ParseXS. This change will be reapplied later.
Steffen Mueller [Sun, 6 Feb 2011 09:59:58 +0000 (10:59 +0100)]
Revert the EU::ParseXS part of
c4a6f826b3676d1fdbd9972a9d0a8f11c02d003d
This is in order to apply Jim Keenan's work to EU::PXS. It is planned to
re-apply this change later.
Steffen Mueller [Sat, 5 Feb 2011 16:06:29 +0000 (17:06 +0100)]
Revert EU::ParseXS part of
c33e8be1506a75e393304af89d64e3f46e0ca7cb
This is necessary in order to apply Jim Keenan's work on
ExtUtils::ParseXS. The plan is to reapply this change later.
... also bump version.
Steffen Mueller [Sun, 6 Feb 2011 17:36:14 +0000 (18:36 +0100)]
Add an email alias for James Keenan
Chris 'BinGOs' Williams [Tue, 12 Jul 2011 15:04:46 +0000 (16:04 +0100)]
Update CPANPLUS to CPAN version 0.9107
[DELTA]
Changes for 0.9107 Tue Jul 12 15:22:14 2011
================================================
* Add support for v-strings and x.y.z versions, using the version module.
* Resolve [rt.cpan.org #69420] "type checking for CPANPLUS::Backend::RV::new is incorrect"
* Resolve [rt.cpan.org #69203] "custom sources ignores timeout config option"