summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Poznyakoff <gray@gnu.org.ua>2019-08-27 23:10:53 +0300
committerSergey Poznyakoff <gray@gnu.org.ua>2019-08-27 23:10:53 +0300
commit3c83bbc82caed02633492928900a480dedcbdd10 (patch)
tree331f3d5ee19ba7f355c6e6c117db975de03264d7
parent7f5328d5fb10150738924c527705389c2b2def51 (diff)
downloadconfig-ast-3c83bbc82caed02633492928900a480dedcbdd10.tar.gz
config-ast-3c83bbc82caed02633492928900a480dedcbdd10.tar.bz2
Provide overloads for the Follow class
* lib/Config/AST/Follow.pm: Provide overloads
-rw-r--r--lib/Config/AST/Follow.pm9
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/Config/AST/Follow.pm b/lib/Config/AST/Follow.pm
index 84d6a3d..4d996a5 100644
--- a/lib/Config/AST/Follow.pm
+++ b/lib/Config/AST/Follow.pm
@@ -121,4 +121,13 @@ sub AUTOLOAD {
121 121
122sub DESTROY { } 122sub DESTROY { }
123 123
124use overload
125 bool => sub { !!shift->{_node} },
126 '""' => sub { shift->{_node}->as_string },
127 eq => sub {
128 my ($self,$other) = @_;
129 return $self->{_node}->as_string eq $other
130 };
131
132
1241; 1331;

Return to:

Send suggestions and report system problems to the System administrator.