I am still getting used to thinking in spherical geometries. The test case I wrote for the perimeter function used a polygon that was rectangular in my head, so I expected its perimeter to be $4\pi / 180°$. However, not only this assumption was wrong (as angular distances between two points with the same latitude at higher latitudes are smaller than those near the equator), but I also did not take into account that all points at the poles are actually coincident, so my result was $3\pi/180°$ which I assumed to be some sort of bug.
Sorry for the confusion, everything was fine from the start!
I am still getting used to thinking in spherical geometries. The test case I wrote for the perimeter function used a polygon that was rectangular in my head, so I expected its perimeter to be $4\pi / 180°$. However, not only this assumption was wrong (as angular distances between two points with the same latitude at higher latitudes are smaller than those near the equator), but I also did not take into account that all points at the poles are actually coincident, so my result was $3\pi/180°$ which I assumed to be some sort of bug.
Sorry for the confusion, everything was fine from the start!