Author: marvin
Date: Thu Mar  8 22:39:23 2012
New Revision: 1298632

URL: http://svn.apache.org/viewvc?rev=1298632&view=rev
Log:
Consolidate code in CFC.pm.

Take the last chunk of meaningful code for the CFC Perl bindings which existed
outside of CFC.pm and CFC.xs and move it into CFC.pm.

Modified:
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm
    incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm

Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm?rev=1298632&r1=1298631&r2=1298632&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm (original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC.pm Thu Mar  8 
22:39:23 2012
@@ -625,7 +625,29 @@ BEGIN { XSLoader::load( 'Clownfish::CFC'
 
 {
     package Clownfish::CFC::Binding::Perl;
-    use Clownfish::CFC::Binding::Perl;
+    BEGIN { push our @ISA, 'Clownfish::CFC::Base' }
+    use Carp;
+    use Clownfish::CFC::Util qw( verify_args a_isa_b );
+
+    our %new_PARAMS = (
+        parcel     => undef,
+        hierarchy  => undef,
+        lib_dir    => undef,
+        boot_class => undef,
+        header     => undef,
+        footer     => undef,
+    );
+
+    sub new {
+        my ( $either, %args ) = @_;
+        verify_args( \%new_PARAMS, %args ) or confess $@;
+        if ( !a_isa_b( $args{parcel}, 'Clownfish::CFC::Parcel' ) ) {
+            $args{parcel}
+                = Clownfish::CFC::Parcel->singleton( name => $args{parcel} );
+        }
+        return _new(
+            @args{qw( parcel hierarchy lib_dir boot_class header footer )} );
+    }
 }
 
 {

Modified: incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm
URL: 
http://svn.apache.org/viewvc/incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm?rev=1298632&r1=1298631&r2=1298632&view=diff
==============================================================================
--- incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm 
(original)
+++ incubator/lucy/trunk/clownfish/perl/lib/Clownfish/CFC/Binding/Perl.pm Thu 
Mar  8 22:39:23 2012
@@ -13,34 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 
-use strict;
-use warnings;
-
 package Clownfish::CFC::Binding::Perl;
-use base qw( Clownfish::CFC::Base );
-
-use Carp;
-use Clownfish::CFC::Util qw( verify_args a_isa_b );
-
-our %new_PARAMS = (
-    parcel     => undef,
-    hierarchy  => undef,
-    lib_dir    => undef,
-    boot_class => undef,
-    header     => undef,
-    footer     => undef,
-);
-
-sub new {
-    my ( $either, %args ) = @_;
-    verify_args( \%new_PARAMS, %args ) or confess $@;
-    if ( !a_isa_b( $args{parcel}, 'Clownfish::CFC::Parcel' ) ) {
-        $args{parcel}
-            = Clownfish::CFC::Parcel->singleton( name => $args{parcel} );
-    }
-    return _new(
-        @args{qw( parcel hierarchy lib_dir boot_class header footer )} );
-}
+use Clownfish::CFC;
 
 1;
 


Reply via email to