3 eval 'exec /usr/bin/perl -w -S $0 ${1+"$@"}'
4 if 0; # not running under some shell
5 #############################################################################
6 ## Name: script/wxperl_overload
7 ## Purpose: builds overload constants
8 ## Author: Mattia Barbon
10 ## Created: 17/08/2001
11 ## RCS-ID: $Id: wxperl_overload 2335 2008-01-21 22:58:59Z mbarbon $
12 ## Copyright: (c) 2001-2003, 2005-2008 Mattia Barbon
13 ## Licence: This program is free software; you can redistribute it and/or
14 ## modify it under the same terms as Perl itself
15 #############################################################################
20 use lib "$FindBin::RealBin/../build";
24 wxperl_overload - create overload declarations for wxPerl extensions
28 # usually invoked from Makefile
29 wxperl_overload <.cpp file> <.h file> files...
31 wxperl_overload <.cpp file> <.h file> file.lst
35 This script if usually invoked from an
36 C<ExtUtils::MakeMaker>-generated file by using C<WX_OVERLOAD> in
39 Scans the files given on the command line or listed in the F<.lst>
40 file searching for wxPerl overload declarations. Writes a F<.h> file
41 with matching F<.cpp> file containing the definition for wxPerl
46 use Wx::Overload::Driver;
48 my( $ovlc, $ovlh ) = ( shift, shift );
50 if( $ARGV[0] && $ARGV[0] =~ /\.lst$/ ) { # lame hack to read list from file
51 open my $fh, "<", $ARGV[0] or die "$!";
52 @ARGV = map { chomp; $_ } <$fh>;
55 my $driver = Wx::Overload::Driver->new