RE: symbolic references in perl module help

2004-07-16 Thread Charles K. Clarkson
having the Hash of symbolic : references in the main namespace so it works. You are not using a hash of symbolic references in A.pm. You are using a reference to a hash of code references. : I just need to know if PERL Perl or perl -- never PERL! : allows symbolic reference variab

Re: symbolic references in perl module help

2004-07-16 Thread James Edward Gray II
ter but I kept getting subruotine undefined...at times in the main:: and in the perl modules... I went around this by having the Hash of symbolic references in the main namespace so it works...I just need to know if PERL allows symbolic reference variables or hashs with symbolic references to

Re: symbolic references in perl module help

2004-07-16 Thread Gunnar Hjalmarsson
->(); $MOD::A::b{foo3}->("pairs"); Still assuming hash references, do you mean: $MOD::A::b->{apple}(); $MOD::A::b->{oranges}(); $MOD::A::b->{open}("pairs"); I went around this by having the Hash of symbolic references in the main namespace so it w

symbolic references in perl module help

2004-07-16 Thread Luis Pachas
.at times in the main:: and in the perl modules... I went around this by having the Hash of symbolic references in the main namespace so it works...I just need to know if PERL allows symbolic reference variables or hashs with symbolic references to be access in

Re: Symbolic references

2004-05-12 Thread Rob Dixon
quot; etc., but the dereferencing never works. An > empty string is printed. The string "1_antwort_1" as the name of an input > field is generated correctly, of course. $antwort doesn't need to be a global variable, but $antwort_text_1 .. 5 do, as symbolic references don't

Re: symbolic references

2004-02-05 Thread david
David Byrne wrote: > Okay, sorry to be somewhat unclear with my question. > HereÂs some sample input data that may help to clear > things up: > > ### > node_id = 0 > parent_node_id = N/A > child_node_ids = 1, 2 > > node_id = 1 > parent_node_id = 0 > child_node_ids = 3, 4 > >

Re: symbolic references

2004-02-04 Thread James Edward Gray II
On Feb 4, 2004, at 4:19 PM, David Byrne wrote: Okay, sorry to be somewhat unclear with my question. Here’s some sample input data that may help to clear things up: See if this gets you going. It's one possible answer. James #!/usr/bin/perl use strict; use warnings; use Data::Dumper; my $tree

Re: symbolic references

2004-02-04 Thread David Byrne
either. > My processor > usage spikes through the roof, but it doesn't seem > to get anywhere. > Does this run for you? > > > Perhaps you could suggest a better solution. > > Perhaps. I know you're building some sort of hash > tree, but I have no >

Re: symbolic references

2004-02-04 Thread James Edward Gray II
hrough the roof, but it doesn't seem to get anywhere. Does this run for you? Perhaps you could suggest a better solution. Perhaps. I know you're building some sort of hash tree, but I have no idea why. Can you tell us what you're aiming for? Currently I'm trying to use sy

symbolic references

2004-02-04 Thread David Byrne
Greetings, I’m trying to generate a tree of nested hashes [of an arbitrary size]. Perhaps you could suggest a better solution. Currently I'm trying to use symbolic references according to the literature… but without much luck. Best regards, David My script is as follows (for now, I’ve tri

Re: symbolic references and hashes

2004-01-07 Thread Gary Stainburn
Hi Rob, On Wednesday 07 January 2004 1:48 pm, Rob Dixon wrote: > "Gary Stainburn" <[EMAIL PROTECTED]> wrote in message [snip] > You're trying to dereference $_BLOCKS as a hash reference. Use > > return sort keys %{"_$key"}; > > and it should work. But note that it won't return the keys from > th

Re: symbolic references and hashes

2004-01-07 Thread Rob Dixon
list { > my $self=shift; > my $key=uc(shift); > print "using '_$key' as hash name\n"; > return sort keys %${"_$key"}; > } > > which according to the section of symbolic references in perldoc perlrefs > should work. However, while Trainset-&

symbolic references and hashes

2004-01-07 Thread Gary Stainburn
st of signalboxes sort keys %_BOXS; } I wanted to eliminate the duplicated code so I wrote: sub list { my $self=shift; my $key=uc(shift); print "using '_$key' as hash name\n"; return sort keys %${"_$key"}; } which according to the section of symbolic referenc

Re: Symbolic references and methods

2003-06-17 Thread Paul Johnson
Tom Gazzini said: > I can call a method on an object using the following: > > $objref->func() > > However, if I try to call this using a symbolic reference: > > my $func_name = "$objref->func"; > &{$func_name)(); > > then I get the following error: > > "Undefined subroutine &main::$objref->func c

Symbolic references and methods

2003-06-17 Thread Tom Gazzini
I can call a method on an object using the following: $objref->func() However, if I try to call this using a symbolic reference: my $func_name = "$objref->func"; &{$func_name)(); then I get the following error: "Undefined subroutine &main::$objref->func called.." The problem is that the perl