pidl: don't export parser class methods
authorDouglas Bagnall <douglas.bagnall@catalyst.net.nz>
Sun, 1 Dec 2019 09:41:06 +0000 (22:41 +1300)
committerAndrew Bartlett <abartlet@samba.org>
Wed, 4 Dec 2019 06:35:05 +0000 (06:35 +0000)
These methods are not used or usable as exported functions. The
correct (and actual) usage is along these lines;

    require Parse::Pidl::Samba3::ClientNDR;
    my $generator = new Parse::Pidl::Samba3::ClientNDR();
    my ($c_code,$h_code) = $generator->Parse($ndr, $header, $c_header);

where the methods are either explicitly referenced (new A::B::C),
or are called from the blessed object, neither of which need
exporting.

Signed-off-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
Autobuild-User(master): Andrew Bartlett <abartlet@samba.org>
Autobuild-Date(master): Wed Dec  4 06:35:06 UTC 2019 on sn-devel-184

pidl/lib/Parse/Pidl/Samba3/ClientNDR.pm
pidl/lib/Parse/Pidl/Samba4/NDR/Client.pm
pidl/lib/Parse/Pidl/Samba4/Python.pm
pidl/lib/Parse/Pidl/Samba4/TDR.pm
pidl/tests/samba3-cli.pl

index 4d125cc799dbe806f2ed6c063157424f88f26305..c132b552f9ac535dda32e4bb8413a08e3ca4dbfe 100644 (file)
@@ -8,10 +8,6 @@
 package Parse::Pidl::Samba3::ClientNDR;
 use base Parse::Pidl::Base;
 
-use Exporter;
-push @ISA, qw(Exporter);
-@EXPORT_OK = qw(ParseFunction $res $res_hdr);
-
 use strict;
 use Parse::Pidl qw(fatal warning error);
 use Parse::Pidl::Util qw(has_property ParseExpr genpad);
index 381bc46defa280f20909b49af4540ac70c123f38..ddd757c749b209dd2c959ec305c96d5d4e3c6238 100644 (file)
@@ -7,10 +7,6 @@
 package Parse::Pidl::Samba4::NDR::Client;
 use parent Parse::Pidl::Base;
 
-use Exporter;
-push @ISA, qw(Exporter);
-@EXPORT_OK = qw(Parse);
-
 use Parse::Pidl qw(fatal warning error);
 use Parse::Pidl::Util qw(has_property ParseExpr genpad);
 use Parse::Pidl::NDR qw(ContainsPipe);
index 75d6ccb356ee3399bfa1880c4608bd8c73af9948..a50f0b54df6aad89769df525c8b02d3639433871 100644 (file)
@@ -6,9 +6,6 @@
 package Parse::Pidl::Samba4::Python;
 use parent Parse::Pidl::Base;
 
-use Exporter;
-push @ISA, 'Exporter';
-
 use strict;
 use Parse::Pidl qw(warning fatal error);
 use Parse::Pidl::Typelist qw(hasType resolveType getType mapTypeName expandAlias bitmap_type_fn enum_type_fn);
index aaabe3328e991357d3be8b73b876186f56b4fe3b..9cb483c0ae02dc43c29dc4d437231438ad0735a0 100644 (file)
@@ -11,10 +11,6 @@ use Parse::Pidl::Typelist qw(mapTypeName);
 
 use base Parse::Pidl::Base;
 
-use Exporter;
-push @ISA, qw(Exporter);
-@EXPORT_OK = qw(ParserType $res $res_hdr);
-
 use vars qw($VERSION);
 $VERSION = '0.01';
 
index c758ef45425b0bb8456ebeff408d399442cae240..4349abb39d6e46c0936324cb67dd657d71e05c8e 100755 (executable)
@@ -9,7 +9,7 @@ use FindBin qw($RealBin);
 use lib "$RealBin";
 use Util;
 use Parse::Pidl::Util qw(MyDumper);
-use Parse::Pidl::Samba3::ClientNDR qw(ParseFunction);
+use Parse::Pidl::Samba3::ClientNDR;
 use Parse::Pidl::Samba4::Header qw(GenerateFunctionInEnv GenerateFunctionOutEnv);
 
 # Make sure GenerateFunctionInEnv and GenerateFunctionOutEnv work