Re: print_r

2006-04-21 Thread Johannes Ernst
Many people indeed suggested Data::Dumper, in fact I did so myself in my original message when I asked: http://www.nntp.perl.org/group/perl.beginners/81554 The problem with Data::Dumper is that it is way too low-level for most application-level debugging, e.g. as I said then: "(I don't w

print_r

2006-04-20 Thread Johannes Ernst
http://netmesh.org/odds-ends/ if it is of interest to anybody. Cheers, Johannes. Johannes Ernst NetMesh Inc. http://netmesh.info/jernst -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] <http://learn.perl.org/> <http://learn

Re: Portal Authentication

2006-03-06 Thread Johannes Ernst
Use an OpenID / Yadis / LID library and let users "bring" their identity? That way, you don't need to do any password management yourself. There are plenty of Perl libraries. More info: http://yadis.org/ http://openid.net/ http://lid.netmesh.org/ http://netmesh.org/ On Mar 6,

Re: print_r in Perl

2006-02-23 Thread Johannes Ernst
wrote: From: "Johannes Ernst" <[EMAIL PROTECTED]> That just changes the amount of whitespace. Here is an example of what I want: Some::Package { a => 'a value', b => 12, c => Other::Package { x => 34 } } Data::Dumper prints it e

Re: print_r in Perl

2006-02-23 Thread Johannes Ernst
ong with my application code ... I tried to do it "manually" with an "objectToString" method, but somehow there seem to be weird cases of data layout that I can't quite get my head around without spending a lot of time on it. I figure somebody must have wanted this b

print_r in Perl

2006-02-23 Thread Johannes Ernst
PHP knows print_r -- which prints a data structure hierarchically, and is very useful for debugging. e.g. echo "Variable a is " . print_r( $a, true ) . "\n"; Is there something similarly easy in Perl? It appears that Data::Dumper may be of help, but I have not been able to figure out how

Re: Why does my inheritance hierarchy get screwed up?

2006-02-23 Thread Johannes Ernst
Thanks everybody pointing out that B is an internal Perl namespace. Duh! I will refrain from comment on whoever made that choice ... In addition, I realized that the order in which 'use' and 'use fields' statements are made is very much significant; if one gets it wrong, mysterious things h

Why does my inheritance hierarchy get screwed up?

2006-02-22 Thread Johannes Ernst
[Blogged about it here: http://netmesh.info/jernst/Technical/perl- inheritance-problem.html ] There are three very simple classes in the following code: C is a subclass of B, which is a subclass of A. If I try to instantiate B (see last two lines of the code below), I'm getting this output