Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
tutorial:perl_intro [2017/07/26 14:51] – changed title oroehrig | user_guide:perl_intro [2019/02/06 18:47] – added links oroehrig |
---|
====== Usinf Perl within polymake ====== | ====== Using Perl within polymake ====== |
| |
The language that the interactive version of ''polymake'' speaks is a dialect of Perl that we refer to as ''polymake''/Perl. See [[http://www.perl.org|www.perl.org]] for comprehensive Perl information. Note also that the ordinary Perl manual pages are particularly useful, especially the perlintro man page which is also available on [[http://perldoc.perl.org/perlintro.html|perldoc]]. This short section here cannot be a replacement for a thorough introduction to this language, but we want to focus on a few key points that are relevant to ''polymake''. | The language that the interactive version of ''polymake'' speaks is a dialect of Perl that we refer to as ''polymake''/Perl. See [[http://www.perl.org|www.perl.org]] for comprehensive Perl information. Note also that the ordinary Perl manual pages are particularly useful, especially the perlintro man page which is also available on [[http://perldoc.perl.org/perlintro.html|perldoc]]. This short section here cannot be a replacement for a thorough introduction to this language, but we want to focus on a few key points that are relevant to ''polymake''. |
</code> | </code> |
====''polymake''-Perl==== | ====''polymake''-Perl==== |
In addition to the three standard data structures, the enriched version of ''Perl'' used in ''polymake'' also provides special data structures for dealing with more complicated structures. ''polymake'''s object hierarchy is completely reflected on the Perl side. Let us create a small polytope as an example object. | In addition to the three standard data structures, the enriched version of ''Perl'' used in ''polymake'' also provides special data structures for dealing with more complicated concepts. For an introduction to the polymake object model see [[.properties#objects|here]]. |
| |
| ''polymake'''s object hierarchy is completely reflected on the Perl side. Let us create a small polytope as an example object. |
<code> | <code> |
> $p = new Polytope(POINTS=>[[1,0,1],[1,0,-1],[1,1,0],[1,-1,0]]); | > $p = new Polytope(POINTS=>[[1,0,1],[1,0,-1],[1,1,0],[1,-1,0]]); |
| |
====Writing scripts==== | ====Writing scripts==== |
Comprehensive information on how to use scripts within ''polymake'' can be found [[scripting:start|here]]. | Comprehensive information on how to use scripts within ''polymake'' can be found [[.howto:scripting|here]]. |