ALT Linux Team development discussions
 help / color / mirror / Atom feed
From: thecrux@gmail.com
To: Dubrovskiy Viacheslav <slava@tangramltd.com>
Cc: ALT Linux Team development discussions <devel@lists.altlinux.org>
Subject: Re: [devel] Помогите собрать   mysql-mmm
Date: Wed, 3 Aug 2011 10:02:27 +0400
Message-ID: <20110803060227.GA4302@mail.truecrux.org> (raw)
In-Reply-To: <4E387A19.70309@tangramltd.com>

On Tue, Aug 02, 2011 at 06:28:41PM -0400, Dubrovskiy Viacheslav wrote:
> Спасибо.
> теперь там такое вылазит:
> 
> Bareword "main::MMM_PROTOCOL_VERSION" not allowed while "strict subs" in
> use at
> /usr/src/tmp/mysql-mmm-buildroot/usr/share/perl5/MMM/Agent/Agent.pm line 90.
> Bareword "main::MMM_PROTOCOL_VERSION" not allowed while "strict subs" in
> use at
> /usr/src/tmp/mysql-mmm-buildroot/usr/share/perl5/MMM/Agent/Agent.pm line 91.
> /usr/src/tmp/mysql-mmm-buildroot/usr/share/perl5/MMM/Agent/Agent.pm had
> compilation errors.

Константа MMM_PROTOCOL_VERSION определена в скрипте, который вызывает этот
модуль. Поэтому на этапе проверки синтаксиса модуля это ошибка, но при вызове 
из скрипта - всё будет работать. 
 
Для решения проблемы можно добавить префикс '&', т.е.
  &main::MMM_PROTOCOL_VERSION
используя тот факт, что все скалярные константы в perl на самом деле inline
процедуры.
 
Или, как вариант, выделить проблемный блок и указать в нём директиву
`no strict 'subs';` :
 
 
-
-   if ($version > main::MMM_PROTOCOL_VERSION) {
-       WARN "Version in command '$cmd_name' ($version) is greater than mine (", main::MMM_PROTOCOL_VERSION, ")"
-   }
+
+   {
+       no strict 'subs';
+       if ($version > main::MMM_PROTOCOL_VERSION) {
+           WARN "Version in command '$cmd_name' ($version) is greater than mine (", main::MMM_PROTOCOL_VERSION, ")"
+       }
+   }

-- 
Vladimir Lettiev aka crux ✉ theCrux@gmail.com


      reply	other threads:[~2011-08-03  6:02 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-08-02 17:39 Dubrovskiy Viacheslav
2011-08-02 17:43 ` Paul Wolneykien
2011-08-02 18:13   ` Dubrovskiy Viacheslav
2011-08-02 18:26     ` Paul Wolneykien
2011-08-02 19:03 ` thecrux
2011-08-02 22:28   ` Dubrovskiy Viacheslav
2011-08-03  6:02     ` thecrux [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110803060227.GA4302@mail.truecrux.org \
    --to=thecrux@gmail.com \
    --cc=devel@lists.altlinux.org \
    --cc=slava@tangramltd.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

ALT Linux Team development discussions

This inbox may be cloned and mirrored by anyone:

	git clone --mirror http://lore.altlinux.org/devel/0 devel/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 devel devel/ http://lore.altlinux.org/devel \
		devel@altlinux.org devel@altlinux.ru devel@lists.altlinux.org devel@lists.altlinux.ru devel@linux.iplabs.ru mandrake-russian@linuxteam.iplabs.ru sisyphus@linuxteam.iplabs.ru
	public-inbox-index devel

Example config snippet for mirrors.
Newsgroup available over NNTP:
	nntp://lore.altlinux.org/org.altlinux.lists.devel


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git