Re: Dynamically referencing a package variable

2007-08-23 Thread Foo JH
> The way I read your post had the encapsulation bells ringing. > > Again, symbolic references offer a possible solution:- > > > > package Root; > $me = 'How much?'; > > package main; > use strict; > use warnings; > > my $package = 'Root'; > my $var_name = 'me'; > > # And ducking the rotten tomat

RE: Dynamically referencing a package variable

2007-08-23 Thread Justin Allegakoen
> Justin Allegakoen wrote: > > ---8< > > I'd like to figure out how to access package variables at runtime. In > > other words, I may have a variable $class that contains the classname, > > and I want to set a value to the package reference by this variable. > > It'll be something like:

Re: Dynamically referencing a package variable

2007-08-23 Thread Foo JH
Thanks Justin, I'm quite familiar with OOP. It's class variables that I'm interested in setting, not instance variables. In Perl, this is implemented as package variables like $MyPackage::MyVariable. I could've done this: $__PACKAGE__::MyVariable, but as I said, the package name is not determi

RE: Dynamically referencing a package variable

2007-08-23 Thread Justin Allegakoen
---8< I'd like to figure out how to access package variables at runtime. In other words, I may have a variable $class that contains the classname, and I want to set a value to the package reference by this variable. It'll be something like: $class::Message = "It works"; ---8<---

How do I read the Response Headers form URL post?

2007-08-23 Thread Mark Funk
Folks, How do I read the response header information. I am using LWP gets code snippet.. use LWP::Debug qw(+ -conns); use LWP::UserAgent; use HTTP::Request::Common; use HTTP::Response; use HTTP::Cookies; use HTTP::Headers; use IO::Socket::SSL; my $ua = LWP::UserAgent->new; $ua->timeou

Re: Back-up drives to CD and other drives

2007-08-23 Thread Chris Wagner
Hi. What I do is use several small bash scripts that use rsync. Each mini script (one-liner) backs up a certain directory tree or a whole disk. They can be scheduled or run manually. So usually after I do my email I run that rsync script to backup my email client. D:\backups>cat eudorabackup.s

Dynamically referencing a package variable

2007-08-23 Thread Foo JH
Hi all, Please bear with me while I try to explain my problem... I'd like to figure out how to access package variables at runtime. In other words, I may have a variable $class that contains the classname, and I want to set a value to the package reference by this variable. It'll be something