[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Channels.pm: I'm confused
From: |
Akim Demaille |
Subject: |
Channels.pm: I'm confused |
Date: |
Wed, 20 Aug 2003 10:29:21 +0200 |
User-agent: |
Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) |
Hi Alexandre,
I meant to apply the appended patch, but it breaks autom4te (and I
guess other bin/ members, but that's the first one). The problem is
that there are several of your ChannelDefs functions that support
several prototypes (w/ or w/o location) like this:
sub fatal ($;$%)
{
my ($where, $msg, %opts) = @_;
msg ('fatal', $where, $msg, %opts);
}
but then, if there is no %opts, it becomes 'undef', which confuses
_merge_options. It results in the error exposed below.
| 3. tools.at:118: testing ...
| tools.at:126: autom4te --language=m4sugar script.4s -o script
| tools.at:134: autom4te --language=m4sugar script.4s -o script
| stderr:
| /usr/local/bin/m4: script.4s: 1: Cannot open foo: No such file or directory
| Odd number of elements in hash assignment at
/home/akim/src/ace/lib/Autom4te/ChannelDefs.pm line 218.
| unknown option `1' at /home/akim/src/ace/lib/Autom4te/Channels.pm line 317
| Autom4te::Channels::_merge_options('HASH(0x82be36c)',1,'undef')
called at /home/akim/src/ace/lib/Autom4te/Channels.pm line 541
| Autom4te::Channels::msg('fatal','/usr/local/bin/m4 failed with exit
status: 1','exit_code',1,'undef') called at
/home/akim/src/ace/lib/Autom4te/ChannelDefs.pm line 219
The line above shows the 'undef' that was inserted by fatal since its
invocation is:
| Autom4te::ChannelDefs::fatal('/usr/local/bin/m4 failed with exit
status: 1','exit_code',1) called at
/home/akim/src/ace/lib/Autom4te/FileUtils.pm line 196
| Autom4te::FileUtils::handle_exec_errors('/usr/local/bin/m4
--nesting-limit=1024 --include=/home/akim/s...') called at
/home/akim/src/ace/lib/Autom4te/FileUtils.pm line 250
| Autom4te::FileUtils::xsystem('/usr/local/bin/m4 --nesting-limit=1024
--include=/home/akim/s...') called at /home/akim/src/ace/bin/autom4te line 675
|
Autom4te::handle_m4('Request=ARRAY(0x8451ae4)','m4_include','m4_pattern_allow','m4_pattern_forbid','include')
called at /home/akim/src/ace/bin/autom4te line 1207
| tools.at:134: sed -e 's,^\([^:]*\): *\([0-9][0-9]*\): *[^:]*m4: ,m4: \1: \2:
,'
| \
| -e 's,^[^:]*m4: *\([^:]*\): *\([0-9][0-9]*\): ,m4: \1: \2: ,'
\
| -e 's/^autom4te: [^ ]*m4 /autom4te: m4 /' \
| -e 's/^autom4te: [^ ]*m4.exe /autom4te: m4 /' \
| -e 's/ (E[A-Z]*)$//' \
| stderr
Note that fatal looks weird: the documentation says that $where is
optional, but the code above seems to says that it is $msg which is
optional...
So it is unclear to me what is it exactly that you meant in
ChannelDefs.
diffs.patch
Description: Text Data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Channels.pm: I'm confused,
Akim Demaille <=