Skip to content

Commit

Permalink
#26 Attempt to fix this by obfuscating the generated pod in *.pod.PL
Browse files Browse the repository at this point in the history
  • Loading branch information
Klortho committed May 19, 2012
1 parent d609efc commit 4c8026c
Show file tree
Hide file tree
Showing 8 changed files with 45 additions and 30 deletions.
7 changes: 7 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
Build
Build.bat
_build
blib
*.tmp
lib/Physics/Unit/UnitsByName.pod
lib/Physics/Unit/UnitsByName.html
lib/Physics/Unit/UnitsByType.pod
lib/Physics/Unit/UnitsByType.html

1 change: 1 addition & 0 deletions MANIFEST
Original file line number Diff line number Diff line change
Expand Up @@ -20,3 +20,4 @@ t/scalar.t
t/unit.t
lib/Physics/Unit/UnitsByName.pod Generated Pod
lib/Physics/Unit/UnitsByType.pod Generated Pod
META.yml
2 changes: 1 addition & 1 deletion lib/Physics/Unit.pm
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use vars qw(
$number_re
);

$VERSION = '0.51';
$VERSION = '0.51_1';
$VERSION = eval $VERSION;

@EXPORT_OK = qw(
Expand Down
2 changes: 1 addition & 1 deletion lib/Physics/Unit/Scalar.pm
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ use Carp;
use base qw(Exporter);
use vars qw( $VERSION @EXPORT_OK %EXPORT_TAGS $debug);

$VERSION = '0.51';
$VERSION = '0.51_1';
$VERSION = eval $VERSION;

@EXPORT_OK = qw( ScalarFactory GetScalar );
Expand Down
2 changes: 1 addition & 1 deletion lib/Physics/Unit/Script.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use warnings;
use Physics::Unit ':ALL';
use Physics::Unit::Script::GenPages;

our $VERSION = '0.51';
our $VERSION = '0.51_1';
$VERSION = eval $VERSION;

use base 'Exporter';
Expand Down
2 changes: 1 addition & 1 deletion lib/Physics/Unit/Script/GenPages.pm
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ package Physics::Unit::Script::GenPages;
use strict;
use warnings;

our $VERSION = '0.51';
our $VERSION = '0.51_1';
$VERSION = eval $VERSION;

use Physics::Unit ':ALL';
Expand Down
28 changes: 17 additions & 11 deletions lib/Physics/Unit/UnitsByName.pod.PL
Original file line number Diff line number Diff line change
Expand Up @@ -7,27 +7,33 @@ use Physics::Unit::Script::GenPages 'GenNameTable';
my $filename = shift;
open my $fh, ">", $filename or die "Could not open $filename for writing";

print $fh <<'PODHEADER';
=head1 NAME
# Make sure none of the generated POD commands appear in column 1, to they
# won't be confused with real POD.

print $fh '=head1 NAME
Physics::Unit::UnitsByName
=head1 DESCRIPTION
', '=head1 DESCRIPTION
This document lists the units provided by L<Physics::Unit> sorted by name. Since the POD standard does not do tables, they are formatted as HTML tables, therefore this is best viewed in a browser-based POD renderer. Note that the L<physics-unit> script can produce a very similar HTML file in the location of your choosing should this be more convenient.
This document lists the units provided by L<Physics::Unit> sorted by name.
Since the POD standard does not do tables, they are formatted as HTML
tables, therefore this is best viewed in a browser-based POD renderer.
Note that the L<physics-unit> script can produce a very similar HTML file
in the location of your choosing should this be more convenient.
=head1 UNITS
', '=head1 UNITS
=begin html
', '=begin html
PODHEADER
';

GenNameTable($fh);

print $fh <<'PODFOOTER';
print $fh '
=end html
', '=end html
=cut
', '=cut
PODFOOTER
';
31 changes: 16 additions & 15 deletions lib/Physics/Unit/UnitsByType.pod.PL
Original file line number Diff line number Diff line change
Expand Up @@ -7,30 +7,31 @@ use Physics::Unit::Script::GenPages 'GenTypeTable';
my $filename = shift;
open my $fh, ">", $filename or die "Could not open $filename for writing";

print $fh <<'PODHEADER';
=head1 NAME
# Make sure none of the generated POD commands appear in column 1, to they
# won't be confused with real POD.

print $fh '=head1 NAME
Physics::Unit::UnitsByType
=head1 DESCRIPTION
', '=head1 DESCRIPTION
This document lists the units provided by L<Physics::Unit> sorted by type. Since the POD
standard does not do tables, they are formatted as HTML tables, therefore this is best
viewed in a browser-based POD renderer. Note that the L<physics-unit> script can produce
a very similar HTML file in the location of your choosing should this be more convenient.
This document lists the units provided by L<Physics::Unit> sorted by type.
Since the POD standard does not do tables, they are formatted as HTML
tables, therefore this is best viewed in a browser-based POD renderer.
Note that the L<physics-unit> script can produce a very similar HTML file
in the location of your choosing should this be more convenient.
=head1 UNITS
', '=head1 UNITS
=begin html
', '=begin html
PODHEADER
';

GenTypeTable($fh);

print $fh <<'PODFOOTER';
=end html
print $fh '=end html
=cut
', '=cut
PODFOOTER
';

0 comments on commit 4c8026c

Please sign in to comment.