@Ghazascanner
_2019runbot
Ghazascanner File Manager
server :Linux phosweb010 3.10.0-1160.el7.x86_64 #1 SMP Mon Oct 19 16:18:59 UTC 2020 x86_64
Current Path :
/
homepage
/
v-mt
/
extlib
/
XML
/
XPath
/
Path :
Upload File :
New :
File
Dir
/homepage/v-mt/extlib/XML/XPath/Variable.pm
# $Id: Variable.pm 4532 2004-05-11 05:15:40Z ezra $ package XML::XPath::Variable; use strict; # This class does NOT contain 1 instance of a variable # see the XML::XPath::Parser class for the instances # This class simply holds the name of the var sub new { my $class = shift; my ($pp, $name) = @_; bless { name => $name, path_parser => $pp }, $class; } sub as_string { my $self = shift; '\$' . $self->{name}; } sub as_xml { my $self = shift; return "<Variable>" . $self->{name} . "</Variable>\n"; } sub get_value { my $self = shift; $self->{path_parser}->get_var($self->{name}); } sub set_value { my $self = shift; my ($val) = @_; $self->{path_parser}->set_var($self->{name}, $val); } sub evaluate { my $self = shift; my $val = $self->get_value; return $val; } 1;