diff options
Diffstat (limited to 'source4/pidl/lib/Parse/Pidl.pm')
-rw-r--r-- | source4/pidl/lib/Parse/Pidl.pm | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source4/pidl/lib/Parse/Pidl.pm b/source4/pidl/lib/Parse/Pidl.pm index c60fc59aba..249bcd9f20 100644 --- a/source4/pidl/lib/Parse/Pidl.pm +++ b/source4/pidl/lib/Parse/Pidl.pm @@ -7,10 +7,32 @@ package Parse::Pidl; +require Exporter; +@ISA = qw(Exporter); +@EXPORT = qw(warning error fatal); + use strict; use vars qw ( $VERSION ); $VERSION = '0.02'; +sub warning($$) +{ + my ($l,$m) = @_; + print STDERR "$l->{FILE}:$l->{LINE}: warning: $m\n"; +} + +sub error($$) +{ + my ($l,$m) = @_; + print STDERR "$l->{FILE}:$l->{LINE}: error: $m\n"; +} + +sub fatal($$) +{ + my ($e,$s) = @_; + die("$e->{FILE}:$e->{LINE}: $s\n"); +} + 1; |