Added tool I used to do that
Kartik Thakore [Thu, 5 Nov 2009 20:12:05 +0000 (15:12 -0500)]
tools/make_XS_stub.pl [new file with mode: 0644]

diff --git a/tools/make_XS_stub.pl b/tools/make_XS_stub.pl
new file mode 100644 (file)
index 0000000..838987b
--- /dev/null
@@ -0,0 +1,37 @@
+
+my @files = qw/
+ActiveEvent    
+KeyboardEvent          
+TextInputEvent         
+MouseMotionEvent       
+MouseButtonEvent       
+JoyAxisEvent   
+JoyHatEvent    
+JoyButtonEvent         
+JoyBallEvent   
+ResizeEvent    
+ExposeEvent    
+SysWMEvent     
+UserEvent      
+QuitEvent      
+keysym                 
+/;
+
+foreach (@files)
+{
+   my $file = $_;
+   my $fn = $file.'.pm';
+   open FH, ">$fn";
+   print FH 
+"package SDL::$file;
+use strict;
+use warnings;
+require Exporter;
+require DynaLoader;
+our \@ISA = qw(Exporter DynaLoader);
+bootstrap SDL::$file;
+1;";
+   close FH;
+}
+
+