=item I<--help>
Show list of available options.
+
+=item I<--version>
+
+Show pidl version
=item I<--outputdir OUTNAME>
use lib "$RealBin/lib";
use Getopt::Long;
use File::Basename;
-use Parse::Pidl;
+use Parse::Pidl qw ( $VERSION );
use Parse::Pidl::Util;
#####################################################################
my(@opt_incdirs) = ();
my($opt_help) = 0;
+my($opt_version) = 0;
my($opt_parse_idl_tree) = 0;
my($opt_dump_idl_tree);
my($opt_dump_ndr_tree);
# display help text
sub ShowHelp()
{
-print "perl IDL parser and code generator
+print "perl IDL parser and code generator\n";
+ShowVersion();
+print"
Copyright (C) Andrew Tridgell <tridge\@samba.org>
Copyright (C) Jelmer Vernooij <jelmer\@samba.org>
Generic Options:
--help this help page
+ --version show pidl version
--outputdir=OUTDIR put output in OUTDIR/ [.]
--warn-compat warn about incompatibility with other compilers
--quiet be quiet
exit(0);
}
+#########################################
+# Display version
+sub ShowVersion()
+{
+ print "perl IDL version $VERSION\n";
+}
+
# main program
my $result = GetOptions (
'help|h|?' => \$opt_help,
+ 'version' => \$opt_version,
'outputdir=s' => \$opt_outputdir,
'dump-idl' => \$opt_dump_idl,
'dump-idl-tree:s' => \$opt_dump_idl_tree,
exit(0);
}
+if ($opt_version) {
+ ShowVersion();
+ exit(0);
+}
+
sub process_file($)
{
my $idl_file = shift;