Skip to content

Commit 805a378

Browse files
avargitster
authored andcommitted
perl: avoid *.pmc and fix Error.pm further
The previous round tried to use *.pmc files but it confused RPM dependency analysis on some distros. Install them as plain vanilla *.pm files instead. Also "local @_" construct did not properly work when goto &sub is used until recent versions of Perl. Avoid it (and we do not need to localize it here anyway). Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 20d2a30 commit 805a378

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2274,14 +2274,14 @@ endif
22742274
po/build/locale/%/LC_MESSAGES/git.mo: po/%.po
22752275
$(QUIET_MSGFMT)mkdir -p $(dir $@) && $(MSGFMT) -o $@ $<
22762276

2277-
PMFILES := $(wildcard perl/*.pm perl/*/*.pm perl/*/*/*.pm perl/*/*/*/*.pm)
2278-
PMCFILES := $(patsubst perl/%.pm,perl/build/lib/%.pmc,$(PMFILES))
2277+
LIB_PERL := $(wildcard perl/Git.pm perl/Git/*.pm perl/Git/*/*.pm perl/Git/*/*/*.pm)
2278+
LIB_PERL_GEN := $(patsubst perl/%.pm,perl/build/lib/%.pm,$(LIB_PERL))
22792279

22802280
ifndef NO_PERL
2281-
all:: $(PMCFILES)
2281+
all:: $(LIB_PERL_GEN)
22822282
endif
22832283

2284-
perl/build/lib/%.pmc: perl/%.pm
2284+
perl/build/lib/%.pm: perl/%.pm
22852285
$(QUIET_GEN)mkdir -p $(dir $@) && \
22862286
sed -e 's|@@LOCALEDIR@@|$(localedir_SQ)|g' < $< > $@
22872287

perl/Git/Error.pm

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ sub import {
3939
require Error;
4040
};
4141

42-
local @_ = ($caller, @_);
42+
unshift @_, $caller;
4343
goto &Error::import;
4444
}
4545

0 commit comments

Comments
 (0)