Using modules with polymake
Posted: 15 Mar 2019, 04:25
I have what I suspect is a newbie question regarding writing perl modules for use in the polymake shell. Here is a minimal broken example that demonstrates my problem. I save the following in a file "example.pm" in my working directory:
In the polymake shell, I do the following:
And then I get the error
polymake: ERROR: Can't locate object method "new" via package "Vector" at example.pm line 7.
Is there an easy fix for this?
Code: Select all
package example;
use strict;
use warnings;
use application "polytope";
sub my_test_routine {
my $v = new Vector([1,0,0]);
return $v;
}
1;
Code: Select all
polytope > use example;
polytope > $v = example::my_test_routine();
polymake: ERROR: Can't locate object method "new" via package "Vector" at example.pm line 7.
Is there an easy fix for this?