Skip to content

Commit 53d91f0

Browse files
author
Chris White
committed
Bump version number; typo fix in Makefile.PL
Also minor cleanup elsewhere, and updated the credits.
1 parent acacb55 commit 53d91f0

File tree

6 files changed

+36
-16
lines changed

6 files changed

+36
-16
lines changed

MANIFEST

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ t/05-external-command.t
1919
t/06-macro.t
2020
t/07-invalid.t
2121
t/08-persistent-state.t
22+
t/09-preproc.t
23+
t/10-postproc.t
2224
t/a.txt
2325
t/b.txt
2426
t/c.txt

Makefile.PL

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ my $secure_perl_path = get_perl_filename();
2323
sub MY::postamble { # TODO also handle Windows nmake syntax (SET vs. export)
2424
return <<EOT;
2525
authortest:
26-
\tRELEASE_TESTING=1 prove -l xt"
26+
\tRELEASE_TESTING=1 prove -l xt
2727
2828
testhere: # Run the tests from lib rather than blib
2929
\t"$secure_perl_path" -Ilib -e 'use Test::Harness "runtests"; runtests \@ARGV;' -- t/*.t

README

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ The build system is straight ExtUtils::MakeMaker.
5353
Before developing, run
5454

5555
perl Makefile.PL
56-
cpanm --installdeps . # if you have cpanminus installed
56+
cpanm --installdeps . # if you have cpanminus installed
5757

5858
Then, to test your code directly from the lib/ directory, run
5959

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -337,5 +337,7 @@ FILETYPE can be determined with `:set ft?`
337337

338338
Distributed under the MIT license --- see
339339
[LICENSE.txt](LICENSE.txt) for details.
340-
By Andrey Shubin (d-ash at Github) and Chris White (cxw42 at Github).
341-
340+
By Andrey Shubin ([d-ash](https://github.com/d-ash)) and
341+
Chris White (CXW; [cxw42](https://github.com/cxw42));
342+
additional contributions by Mohammad S Anwar (MANWAR;
343+
[manwar](https://github.com/manwar)).

bin/perlpp

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -301,12 +301,26 @@ L<ExtUtils::PerlPP>, L<HTML::EP>, L<PML>, L<Preproc::Tiny>, L<ePerl>, L<iperl>.
301301
302302
=head1 AUTHORS
303303
304-
Andrey Shubin (d-ash at Github; L<[email protected]>) and
305-
Chris White (cxw42 at Github; L<[email protected]>).
304+
=over
305+
306+
=item *
307+
308+
Originally by Andrey Shubin (d-ash at Github; C<[email protected]>)
309+
310+
=item *
311+
312+
Currently maintained by Chris White (CXW; cxw42 at Github;
313+
314+
315+
=item *
316+
317+
Other contributions by Mohammad S. Anwar (MANWAR; manwar at Github)
318+
319+
=back
306320
307321
=head1 LICENSE AND COPYRIGHT
308322
309-
Copyright 2013-2018 Andrey Shubin and Christopher White.
323+
Copyright 2013-2018 PerlPP Contributors (listed above)
310324
311325
This program is distributed under the MIT (X11) License:
312326
L<http://www.opensource.org/licenses/mit-license.php>

lib/Text/PerlPP.pm

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,9 @@
44
package Text::PerlPP;
55

66
# Semantic versioning, packed per Perl rules. Must always be at least one
7-
# digit left of the decimal, and six digits right of the decimal.
8-
our $VERSION = '0.600_000';
7+
# digit left of the decimal, and six digits right of the decimal. For
8+
# prerelease versions, put an underscore before the last three digits.
9+
our $VERSION = '0.600001';
910

1011
use 5.010001;
1112
use strict;
@@ -815,26 +816,25 @@ sub Main {
815816
return EXIT_OK;
816817
}
817818

818-
# Preamble
819-
820819
# Save
821820
push @Instances, $self;
822821

823822
$self->{Package} = $self->{Opts}->{INPUT_FILENAME};
824823
$self->{Package} =~ s/^.*?([a-z_][a-z_0-9.]*).pl?$/$1/i;
825824
$self->{Package} =~ s/[^a-z0-9_]/_/gi;
826-
# $self->{Package} is not the whole name, so can start with a number.
825+
# Not the whole name yet, so can start with a number.
827826
$self->{Package} = "PPP_$self->{Package}$#Instances";
828827

829828
# Make $self accessible from inside the package.
830829
# This has to happen first so that :macro or :immediate blocks in the
831830
# script can access it while the input is being parsed.
832831
{
833832
no strict 'refs';
834-
${ "$self->{Package}::" . PPP_SELF_INSIDE }
835-
= $Text::PerlPP::Instances[$#Instances];
833+
${ "$self->{Package}::" . PPP_SELF_INSIDE } = $self;
836834
}
837835

836+
# --- Preamble -----------
837+
838838
$self->StartOB(); # Output from here on will be included in the generated script
839839

840840
# Help the user know where to look
@@ -846,7 +846,7 @@ sub Main {
846846
emit "use constant { true => !!1, false => !!0 };\n";
847847
emit 'our $' . PPP_SELF_INSIDE . ";\n"; # Lexical alias for $self
848848

849-
# Definitions
849+
# --- Definitions --------
850850

851851
# Transfer parameters from the command line (-D) to the processed file,
852852
# as textual representations of expressions.
@@ -910,6 +910,8 @@ sub Main {
910910
}
911911
emit ");\n";
912912

913+
# --- User input ---------
914+
913915
# Initial code from the command line, if any
914916
if($self->{Opts}->{EVAL}) {
915917
$self->emit_pound_line( '<-e>', 1 );
@@ -921,7 +923,7 @@ sub Main {
921923

922924
my $script = $self->EndOB(); # The generated Perl script
923925

924-
# --- Run it ---
926+
# --- Run it -------------
925927
if ( $self->{Opts}->{DEBUG} ) {
926928
print $script;
927929

0 commit comments

Comments
 (0)