[strongSwan-dev] [PATCH 3/4] vici-perl: do not export methods.

Andreas Hofmeister andi at collax.com
Thu Dec 17 14:56:14 CET 2015


"Exporter" can be used to export plain functions into another modules name
space. But the things that were exported here are meant to be called as
methods.  In this case, it is neither necessary nor advisable to export those
symbols.

Just export nothing (the POD documentation already said so).
---
 .../plugins/vici/perl/Vici-Session/lib/Vici/Message.pm         |  6 ------
 .../plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm          |  6 ------
 .../plugins/vici/perl/Vici-Session/lib/Vici/Session.pm         | 10 ----------
 .../plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm       |  6 ------
 4 files changed, 28 deletions(-)

diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm
index e1b2d8e..e30b691 100644
--- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm
+++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Message.pm
@@ -1,11 +1,5 @@
 package Vici::Message;
 
-require Exporter;
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(
-    new, from_data, hash, encode, raw, result
-);
 our $VERSION = '0.9';
 
 use strict;
diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm
index 5a8f929..db22774 100644
--- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm
+++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Packet.pm
@@ -1,11 +1,5 @@
 package Vici::Packet;
 
-require Exporter;
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(
-    new, request, register, unregister, streamed_request
-);
 our $VERSION = '0.9';
 
 use strict;
diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm
index 3f34f0e..2ca2d82 100644
--- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm
+++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Session.pm
@@ -1,15 +1,5 @@
 package Vici::Session;
 
-require Exporter;
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(
-    new, version, stats, reload_settings, initiate, terminate, install,
-    uninstall, list_sas, list_policies, list_conns, get_conns, list_certs,
-    list_authorities, get_authorities, load_conn, unload_conn, load_cert,
-    load_key, load_shared, clear_creds, load_authority, unload_authority,
-    load_pool, unload_pool, get_pools, get_algorithms
-);
 our $VERSION = '0.9';
 
 use strict;
diff --git a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm
index a2ebe6c..41f35e0 100644
--- a/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm
+++ b/src/libcharon/plugins/vici/perl/Vici-Session/lib/Vici/Transport.pm
@@ -1,11 +1,5 @@
 package Vici::Transport;
 
-require Exporter;
-
-our @ISA = qw(Exporter);
-our @EXPORT = qw(
-    new, send, receive
-);
 our $VERSION = '0.9';
 
 use strict;
-- 
2.6.2



More information about the Dev mailing list