Skip to content

Commit

Permalink
Merge pull request #18 from cxw42/issue17
Browse files Browse the repository at this point in the history
Convert to CPAN form
  • Loading branch information
cxw42 authored May 12, 2018
2 parents 78f8025 + b211056 commit b9824fe
Show file tree
Hide file tree
Showing 26 changed files with 666 additions and 100 deletions.
52 changes: 51 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,53 @@
.*.swp
# Specific
/tags
/fatlib
/stuff

# Dist
/Text-PerlPP*

# Editor
*.bak
*~
~*
*.swp

# from GitHub's perl .gitignore:
!Build/
.last_cover_stats
/META.yml
/META.json
/MYMETA.*
*.o
*.pm.tdy
*.bs

# Devel::Cover
cover_db/

# Devel::NYTProf
nytprof.out

# Dizt::Zilla
/.build/

# Module::Build
_build/
Build
Build.bat

# Module::Install
inc/

# ExtUtils::MakeMaker
/blib/
/_eumm/
/*.gz
/Makefile
/Makefile.old
/MANIFEST.bak
/pm_to_blib
/*.zip

# Capture::Tiny
DEBUG*
5 changes: 5 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Revision history for Text-PerlPP

0.3.1 2018/05/11
First CPAN version, released on an unsuspecting world.

2 changes: 1 addition & 1 deletion LICENSE.txt → LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)
Copyright © 2013 Andrey Shubin <[email protected]>
Portions copyright © 2016 Chris White <[email protected]>
Portions copyright © 2016-2018 Chris White <[email protected]>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the “Software”), to deal
Expand Down
23 changes: 23 additions & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
bin/perlpp The command-line invoker
Changes
lib/Text/PerlPP.pm The main code and perldoc
LICENSE
Makefile.PL
MANIFEST This list of files
MANIFEST.SKIP
pack.PL Script to make the packed version
README
README.md The tutorial
t/00-load.t
t/01-basic.t
t/01-readme.t
t/02-cmdline.t
t/03-idempotency.t
t/04-include.t
t/05-external-command.t
t/06-macro.t
t/07-invalid.t
t/a.txt
t/b.txt
t/c.txt
t/included.txt
77 changes: 77 additions & 0 deletions MANIFEST.SKIP
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
# MANIFEST.SKIP for Text::PerlPP

#!start included /home/ChrisW/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/ExtUtils/MANIFEST.SKIP
# Avoid version control files.
\bRCS\b
\bCVS\b
\bSCCS\b
,v$
\B\.svn\b
\B\.git\b
\B\.gitignore\b
\b_darcs\b
\B\.cvsignore$

# Avoid VMS specific MakeMaker generated files
\bDescrip.MMS$
\bDESCRIP.MMS$
\bdescrip.mms$

# Avoid Makemaker generated and utility files.
\bMANIFEST\.bak
\bMakefile$
\bblib/
\bMakeMaker-\d
\bpm_to_blib\.ts$
\bpm_to_blib$
\bblibdirs\.ts$ # 6.18 through 6.25 generated this
\b_eumm/ # 7.05_05 and above

# Avoid Module::Build generated and utility files.
\bBuild$
\b_build/
\bBuild.bat$
\bBuild.COM$
\bBUILD.COM$
\bbuild.com$

# and Module::Build::Tiny generated files
\b_build_params$

# Avoid temp and backup files.
~$
\.old$
\#$
\b\.#
\.bak$
\.tmp$
\.#
\.rej$
\..*\.sw.?$

# Avoid OS-specific files/dirs
# Mac OSX metadata
\B\.DS_Store
# Mac OSX SMB mount metadata files
\B\._

# Avoid Devel::Cover and Devel::CoverX::Covered files.
\bcover_db\b
\bcovered\b

# Avoid prove files
\B\.prove$

# Avoid MYMETA files
^MYMETA\.
#!end included /home/ChrisW/perl5/perlbrew/perls/perl-5.26.1/lib/5.26.1/ExtUtils
/MANIFEST.SKIP

# Skip directories
^stuff\b
^fatlib\b
^xt\b

# Skip some specific files
^Makefile-premodule
^tags
11 changes: 0 additions & 11 deletions Makefile

This file was deleted.

44 changes: 44 additions & 0 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
use 5.010;
use strict;
use warnings;
use ExtUtils::MakeMaker;

sub MY::postamble {
return <<EOT;
authortest:
\tRELEASE_TESTING=1 prove -l xt"
testhere: # Run the tests from lib rather than blib
\texport PERLPP_CMD="perl -Ilib bin/perlpp"; \\
\tperl -Ilib -e 'use Test::Harness "runtests"; runtests \@ARGV;' -- t/*.t
testpacked: pack # Test the packed version
\texport PERLPP_NOUSE=1 PERLPP_CMD="perl blib/perlpp"; \\
\tperl -e 'use Test::Harness "runtests"; runtests \@ARGV;' -- t/*.t
EOT
} #postamble

WriteMakefile(
NAME => 'Text::PerlPP',
AUTHOR => q{Christopher White <[email protected]>},
VERSION_FROM => 'lib/Text/PerlPP.pm',
ABSTRACT_FROM => 'lib/Text/PerlPP.pm',
LICENSE => 'mit',

EXE_FILES => [ 'bin/perlpp' ],
MIN_PERL_VERSION => '5.010',
CONFIGURE_REQUIRES => {
'ExtUtils::MakeMaker' => '0',
},
BUILD_REQUIRES => {
'Test::More' => '0',
'App::FatPacker' => '0',
},
PREREQ_PM => {
'Pod::Usage' => '0',
'Getopt::Long' => '2.50', # Per issue #17
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Text-PerlPP-* fatlib' },
);
# vi: set ts=4 sts=4 sw=4 et ai: #
77 changes: 77 additions & 0 deletions README
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
Text-PerlPP - a Perl preprocessor

Translates text files with embedded Perl code to plain text files.
See README.md for details. A simple example:

<? my $x = 42; ?><?! echo Hello, World! ?><?= $x ?>

will output

Hello, World!
42

<? ... ?> is a Perl code chunk, <?! ... ?> runs an external command, and
<?= ... ?> prints a Perl expression. There are more commands, listed in
README.md.

REQUIRES

Perl 5.10+ and Getopt::Long 2.50. There is a fatpacked version that
already includes Getopt::Long in the GitHub releases archive:
https://github.com/interpreters/perlpp/releases

INSTALLATION

Easy installation, using App::cpanminus:

cpanm Text::PerlPP

Easy installation, using the release from GitHub:

- Copy the release file to a directory in your PATH

Slightly less easy installation, using ExtUtils::MakeMaker:

- Unpack the tarball
- In the resulting directory, run the following commands:

perl Makefile.PL
make
make test
make install

Yet another alternative way of installing

- Copy lib/Text/PerlPP.pm to a directory in your @INC
- Copy bin/perlpp to a directory in your PATH.

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command.

perldoc Text::PerlPP

You can also look for information at:

GitHub (report bugs here)
https://github.com/interpreters/perlpp

AnnoCPAN, Annotated CPAN documentation
http://annocpan.org/dist/Text-PerlPP

CPAN Ratings
http://cpanratings.perl.org/d/Text-PerlPP

Search CPAN
http://search.cpan.org/dist/Text-PerlPP/

LICENSE AND COPYRIGHT

Copyright 2013-2018 Andrey Shubin and Christopher White.

This program is distributed under the MIT (X11) License:
http://www.opensource.org/licenses/mit-license.php

See LICENSE for full details.

6 changes: 6 additions & 0 deletions bin/perlpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!perl -w
# To run this manually from the source tree, do
# perl -Ilib bin/perlpp
use strict; use warnings; use Text::PerlPP;
exit(Text::PerlPP::Main(\@ARGV));
# vi: set ft=perl: #
Loading

0 comments on commit b9824fe

Please sign in to comment.