Thread (36 messages) flat view 36 messages, 5 authors, 2016-06-15

Re: [PATCH v2 02/22] git-remote-mediawiki: Use the Readonly module instead of the constant pragma

From: Jeff King <hidden>
Date: 2016-06-15 22:57:36

On Fri, Jun 07, 2013 at 11:42:03PM +0200, Célestin Matte wrote:
quoted hunk ↗ jump to hunk
diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl b/contrib/mw-to-git/git-remote-mediawiki.perl
index 4893442..e60793a 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -26,21 +26,21 @@ use IPC::Open2;
 use Readonly;
What does this series apply on top of? The existing version in "master"
does not have "use Readonly" in it at all. The first version of your
series introduced that line, but here it is shown as an existing line.
Did you miss a commit when putting your patches together?
 # Mediawiki filenames can contain forward slashes. This variable decides by which pattern they should be replaced
-use constant SLASH_REPLACEMENT => "%2F";
+Readonly my $SLASH_REPLACEMENT => "%2F";
What advantage does this have over "use constant"? I do not mind
following guidelines from perlcritic if they are a matter of style, but
in this case there is a cost: we now depend on the "Readonly" module,
which is not part of the standard distribution. I.e., users now have to
deal with installing an extra dependency. Is it worth it?

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help