Documentation for CFCPerl

Project: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/commit/68ab7377
Tree: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/tree/68ab7377
Diff: http://git-wip-us.apache.org/repos/asf/lucy-clownfish/diff/68ab7377

Branch: refs/heads/cfc-pod-wip2
Commit: 68ab7377638492e28d48bf48208325eb3a62ef94
Parents: 2f193bc
Author: Nick Wellnhofer <[email protected]>
Authored: Sat Jul 20 20:18:03 2013 +0200
Committer: Nick Wellnhofer <[email protected]>
Committed: Wed Jun 25 17:45:00 2014 +0200

----------------------------------------------------------------------
 .../buildlib/Clownfish/CFC/Build/Binding.pm     | 26 ++++++++++++++++++++
 compiler/src/CFCPerl.h                          |  3 +--
 2 files changed, 27 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/68ab7377/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
----------------------------------------------------------------------
diff --git a/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm 
b/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
index 16d4d80..17e3a47 100644
--- a/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
+++ b/compiler/perl/buildlib/Clownfish/CFC/Build/Binding.pm
@@ -18,10 +18,36 @@ use strict;
 
 sub bind_all {
     my $class = shift;
+    $class->bind_perl;
     $class->bind_perlclass;
     $class->bind_perlpod;
 }
 
+sub bind_perl {
+    class_from_c('CFCPerl', 'Clownfish::CFC::Binding::Perl');
+
+    my @exposed = qw(
+        Write_Pod
+        Write_Boot
+        Write_Bindings
+        Write_Callbacks
+        Write_Hostdefs
+        Write_Xs_Typemap
+    );
+
+    my $pod_spec = Clownfish::CFC::Binding::Perl::Pod->new;
+    $pod_spec->add_constructor( alias => 'new' );
+    $pod_spec->add_method( method => $_, alias => lc($_) ) for @exposed;
+
+    my $binding = Clownfish::CFC::Binding::Perl::Class->new(
+        parcel     => 'Clownfish',
+        class_name => 'Clownfish::CFC::Binding::Perl',
+    );
+    $binding->set_pod_spec($pod_spec);
+
+    Clownfish::CFC::Binding::Perl::Class->register($binding);
+}
+
 sub bind_perlclass {
     class_from_c('CFCPerlClass', 'Clownfish::CFC::Binding::Perl::Class');
 

http://git-wip-us.apache.org/repos/asf/lucy-clownfish/blob/68ab7377/compiler/src/CFCPerl.h
----------------------------------------------------------------------
diff --git a/compiler/src/CFCPerl.h b/compiler/src/CFCPerl.h
index eef10ac..6427996 100644
--- a/compiler/src/CFCPerl.h
+++ b/compiler/src/CFCPerl.h
@@ -25,8 +25,7 @@ typedef struct CFCPerl CFCPerl;
 struct CFCParcel;
 struct CFCHierarchy;
 
-/** Clownfish::CFC::Binding::Perl - Perl bindings for a
- * Clownfish::CFC::Model::Hierarchy.
+/** Perl bindings for a Clownfish::CFC::Model::Hierarchy.
  * 
  * Clownfish::CFC::Binding::Perl presents an interface for auto-generating XS
  * and Perl code to bind C code for a Clownfish class hierarchy to Perl.

Reply via email to