FAQ

On May 21, 2004, at 8:52 PM, Aamer Akhter wrote:

Aamer Akhter wrote:
Hello,
I have the following RD_AUTOACTION:
$::RD_AUTOACTION = q{
if ($#item==1 && ($item->isterminal || ref $item[1] ne 'ARRAY')) {
the problem was $item-- i guess i was sidetracked by the other Xitems
;-). Hopefully there is another easy way for checking for
terminal-ness.
#if only one item, and is either a terminal or an array
$return = $item[1];
} else {
foreach my $i (keys %item) {
if ($i=~ s/(\([\?s]\))$//o) {
$item{$i} = \@{$item{$i.$1}};
delete $item{$i.$1};
}
}
$return = bless \%item, $item[0];
}
};
If I precompile to a module, the code generated does not compile.
Specifically, I get this error:
perl0: Global symbol "$item" requires explicit package name at
grammars/show_ip_interface_brief.pm line 114.
Otherwise (without precompile) the AUTOACTION works fine.
Obviously I can't do a my for the @item or %item. Any suggestions on
how to get past this? I'm looking thru the RD_TRACE and .pm file for
the differences right now, but wondering if somebody has run into
this already.
I'm prelpexed, the only differences appear to be the difference in
namespace, the package encloser, and the constructor at the end of the
.pm file.

any insight would be greatly appreciated.
Thanks.
aamer akhter

--
Aamer Akhter / aa@cisco.com
NSITE cisco Systems
--
Aamer Akhter / aa@cisco.com
NSITE cisco Systems

Search Discussions

Discussion Posts

Previous

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 3 of 3 | next ›
Discussion Overview
grouprecdescent @
categoriesperl
postedMay 22, '04 at 12:29a
activeMay 22, '04 at 3:08a
posts3
users1
websitemetacpan.org...

1 user in discussion

Aamer Akhter: 3 posts

People

Translate

site design / logo © 2018 Grokbase