1 #############################################################################
2 ## Name: build/Wx/Overload/Handle.pm
3 ## Purpose: builds overload constants
4 ## Author: Mattia Barbon
7 ## RCS-ID: $Id: Handle.pm 2057 2007-06-18 23:03:00Z mbarbon $
8 ## Copyright: (c) 2001-2003, 2005-2006 Mattia Barbon
9 ## Licence: This program is free software; you can redistribute it and/or
10 ## modify it under the same terms as Perl itself
11 #############################################################################
13 package Wx::Overload::Handle;
17 use Wx::build::Utils qw(read_file write_file);
20 my( $class, $file ) = @_;
22 return bless { FILE => $file,
28 $this->{DATA} .= join '', @_;
34 print "Writing '", $this->{FILE}, "'.\n";
35 write_file( $this->{FILE}, $this->{DATA} );
42 my $text = read_file( $this->{FILE} );
43 if( $text eq $this->{DATA} ) {
44 print "'", $this->{FILE}, "' not modified, skipping\n";