If it wouldn't have stopped working, nobody in the GAP team would have noticed
.
I had hoped there would be a precise documentation. I started using ->give. Then I found out that there are methods like VISUAL, that are not properties but used for documented behavior on the gap side. Actually I am currently doing
Code: Select all
my $file = shift(@ARGV);
my $rtn = 0;
$rtn = 1 if $#ARGV > 1;
sub give_from {
my ($c, $arg) = @_;
no strict 'refs';
return $c->$arg;
}
my $c=load($file);
my @rtn = ();
foreach my $arg (@ARGV) {
my @sargs = split(/\b\s+\b/, $arg);
$rtn = 1 if $#sargs > 1;
foreach my $sarg (@sargs) {
my @ssargs = split('->', $sarg);
my $given = $c;
# We follow the arrows
foreach my $ssarg (@ssargs) {
$given = give_from($given, $ssarg);
}
# and return what the last one gave us
push(@rtn, "$sarg\n$given\n");
}
}
print join("\n", @rtn);
return $rtn;
As you can see I am splitting at '->', which means I am on a slippery slope since only perl can parse perl. I do however want to avoid eval.
Basically I am finding out why the feature has been removed. So I thing I will stop with the above and add a script argument to GAP polymaking API.