Thread (4 messages) flat view 4 messages, 3 authors, 2016-06-15

Re: Quick merge status updates.

From: Pavel Roskin <hidden>
Date: 2016-06-15 22:42:31
Subsystem: the rest · Maintainer: Linus Torvalds

Possibly related (same subject, not in this thread)

On Wed, 2006-06-28 at 01:49 -0700, Junio C Hamano wrote:
I suspect this is either FC perl-dev package is broken (I doubt
it) or your installation procedure is pecurilar (much more
likely).  I pass the same set of prefix, bindir and friends to
"make" and "make install" and do not see the problem.
I think my Perl 5.8.8 is "too new".  "man perlfunc" says about "use":

"Imports some semantics into the current package from the named module,
generally by aliasing certain subroutine or variable names into your
package.  It is exactly equivalent to

      BEGIN { require Module; import Module LIST; }

except that Module must be a bareword."

I think the BEGIN block has priority over other statements.  My solution
was to put the @INC change in the BEGIN block as well.

This patch is working for me:
diff --git a/git-fmt-merge-msg.perl b/git-fmt-merge-msg.perl
index e8fad02..1b23fa1 100755
--- a/git-fmt-merge-msg.perl
+++ b/git-fmt-merge-msg.perl
@@ -5,7 +5,7 @@ #
 # Read .git/FETCH_HEAD and make a human readable merge message
 # by grouping branches and tags together to form a single line.
 
-unshift @INC, '@@INSTLIBDIR@@';
+BEGIN { unshift @INC, '@@INSTLIBDIR@@'; }
 use strict;
 use Git;
 use Error qw(:try);

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