Repository: lucy-clownfish Updated Branches: refs/heads/master 2b6e27a24 -> e4c04e2e0
Revert "Cloak POD for the CPAN dist of Clownfish." This reverts commit fc58f35714556471476fe0c474bc5b80dda06a96. Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/46536926 Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/46536926 Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/46536926 Branch: refs/heads/master Commit: 465369261883818cebf1fae97881c18669808c9e Parents: 2b6e27a Author: Nick Wellnhofer <wellnho...@aevum.de> Authored: Mon Feb 22 17:38:40 2016 +0100 Committer: Nick Wellnhofer <wellnho...@aevum.de> Committed: Mon Feb 22 17:38:40 2016 +0100 ---------------------------------------------------------------------- runtime/perl/buildlib/Clownfish/Build.pm | 52 --------------------------- runtime/perl/lib/Clownfish.pm | 28 --------------- 2 files changed, 80 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/46536926/runtime/perl/buildlib/Clownfish/Build.pm ---------------------------------------------------------------------- diff --git a/runtime/perl/buildlib/Clownfish/Build.pm b/runtime/perl/buildlib/Clownfish/Build.pm index 3778a2c..412d3d6 100644 --- a/runtime/perl/buildlib/Clownfish/Build.pm +++ b/runtime/perl/buildlib/Clownfish/Build.pm @@ -42,7 +42,6 @@ $VERSION = eval $VERSION; use File::Spec::Functions qw( catdir catfile updir rel2abs ); use File::Path qw( rmtree ); use File::Copy qw( move ); -use File::Find qw( find ); use Config; use Carp; use Cwd qw( getcwd ); @@ -317,10 +316,8 @@ sub ACTION_dist { system("cp -R $from $to") and confess("cp failed"); } move( "MANIFEST", "MANIFEST.bak" ) or die "move() failed: $!"; - my $saved = _hide_pod( $self, { 'lib/Clownfish.pm' => 1 } ); $self->depends_on("manifest"); $self->SUPER::ACTION_dist; - _restore_pod( $self, $saved ); # Now that the tarball is packaged up, delete the copied assets. rmtree($_) for values %to_copy; @@ -329,54 +326,5 @@ sub ACTION_dist { move( "MANIFEST.bak", "MANIFEST" ) or die "move() failed: $!"; } - -# Strip POD from files in the `lib` directory. This is a temporary measure to -# allow us to release Clownfish as a separate dist but with a cloaked API. -sub _hide_pod { - my ( $self, $excluded ) = @_; - my %saved; - find( - { - no_chdir => 1, - wanted => sub { - my $path = $File::Find::name; - return if $excluded->{$path}; - return unless $path =~ /\.(pm|pod)$/; - open( my $fh, '<:encoding(UTF-8)', $path ) - or confess("Can't open '$path' for reading: $!"); - my $content = do { local $/; <$fh> }; - close $fh; - if ( $path =~ /\.pod$/ ) { - $saved{$path} = $content; - print "Hiding POD for $path\n"; - unlink($path) or confess("Can't unlink '$path': $!"); - } - else { - my $copy = $content; - $copy =~ s/^=\w+.*?^=cut\s*$//gsm; - return if $copy eq $content; - print "Hiding POD for $path\n"; - $saved{$path} = $content; - open( $fh, '>:encoding(UTF-8)', $path ) - or confess("Can't open '$path' for writing: $!"); - print $fh $copy; - } - }, - }, - 'lib', - ); - return \%saved; -} - -# Undo POD hiding. -sub _restore_pod { - my ( $self, $saved ) = @_; - while ( my ( $path, $content ) = each %$saved ) { - open( my $fh, '>:encoding(UTF-8)', $path ) - or confess("Can't open '$path' for writing: $!"); - print $fh $saved->{$path}; - } -} - 1; http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/46536926/runtime/perl/lib/Clownfish.pm ---------------------------------------------------------------------- diff --git a/runtime/perl/lib/Clownfish.pm b/runtime/perl/lib/Clownfish.pm index 1a6f7cd..bc45c17 100644 --- a/runtime/perl/lib/Clownfish.pm +++ b/runtime/perl/lib/Clownfish.pm @@ -181,31 +181,3 @@ sub error {$Clownfish::Err::error} 1; -__END__ - -=head1 NAME - -Clownfish - Apache Clownfish symbiotic object system. - -=head1 VERSION - -0.4.0 - -=head1 DESCRIPTION - -The Apache Clownfish "symbiotic" object system for C is designed to pair with -a "host" dynamic language environment, facilitating the development of high -performance host language extensions. Clownfish classes are declared in -header files with a C<.cfh> extension. The Clownfish headers are used by the -Clownfish compiler to generate C header files and host language bindings. -Methods, functions and variables are defined in normal C source files. - -The API for this alpha release of Clownfish has been cloaked. - -=head1 COPYRIGHT - -Clownfish is distributed under the Apache License, Version 2.0, as -described in the file C<LICENSE> included with the distribution. - -=cut -