Get rid of Test::More in 01-pod.t
[Math-GSL.git] / bin / create_export_code
blobf2be87f8e7106552508472e3cb06732806fb2f70
1 #!/usr/bin/perl -w
3 use strict;
4 use warnings;
6 my @export;
8 # this will match any function or variable
9 # being mapped in the symbol table that is
10 # not an internal swig wrapper
11 my $regex = qr/^\*(?!swig_)([^=]+)\s*=/;
13 while(<>){
14 push @export, $1 if /$regex/;
16 print build_code(\@export);
18 sub build_code {
19 my ($export,$tags) = @_;
21 return q!
22 %perlcode %{
23 @EXPORT_OK = qw/
24 ! . join ("\n" . (' 'x15), @$export) . q!
26 %EXPORT_TAGS = ( all => [ @EXPORT_OK ] );