[Bath-pm] OO / global instance variable

Andrew McGregor andy at pasty.org.uk
Tue May 24 09:26:14 PDT 2005


> An OO question.

The same way as any other global instance variable I guess :)

package My::Obj;

use XML::Parser;

my $var;

sub handle_char_data {
	my ($expat, $text);
	$var = $text
}





More information about the Bath-pm mailing list