GIS::D...ormula(3pm)
π GIS::D...ormula β the manual, but make it cute π
okay so real quick, the vibe check: this is GIS::D...ormula(3pm) from the User Contributed Perl Documentation collection, and bestie, it's literally the blueprint page. let's get into it π«Ά
β¨ NAME β¨
GIS::Distance::Formula β the Formula base class. she's the mother of all formula classes, the blueprint, the template, the moment. π
π DESCRIPTION π
So here's the tea, bestie: this is the parent class for every single GIS::Distance formula class out there β like, all of the ones listed under "FORMULAS" in GIS::Distance. she's the origin, the blueprint, the main character that all the other formulas inherit their whole personality from. π
π¦ authoring your own formula class (yes, you can slay too)
Wanna build your own formula class? iconic. here's exactly how, no gatekeeping:
package My::Formula;
use parent 'GIS::Distance::Formula';
sub _distance {
my ($lat1, $lon1, $lat2, $lon2) = @_;
# ...
return $kilometers;
}
1;
and then you literally just use it like:
my $gis = GIS::Distance->new('My::Formula');
my $km = $gis->distance( @coords );
periodt. that's it. that's the whole thing. π
β the SELF moment (iykyk)
okay so this part is important so listen up: the global variable $GIS::Distance::Formula::SELF is available when your _distance() subroutine gets called if, and only if, the entry point was distance in GIS::Distance and NOT distance_metal in GIS::Distance or otherwise.
not me being dramatic about an if and only if but bestie it literally says if, and only if, so don't come for me when it's not there. that's on the entry point, not on us. π
πΈ the lore
much of the interface described in GIS::Distance is actually implemented by this module. so like, this one's doing a lot of the heavy lifting behind the scenes. lowkey a workhorse, highkey a queen. π
π SUPPORT π
See "SUPPORT" in GIS::Distance. (she points you to her sister page, we love a delegation moment β¨)
π AUTHORS π
See "AUTHORS" in GIS::Distance. the legends are listed over there, go give them their flowers π
π LICENSE π
See "LICENSE" in GIS::Distance. yes it's the same page again, and yes that's intentional, and yes it's iconic. go read it. π
and that's the whole page bestie, we ate and left absolutely zero crumbs π§
this page is from perl v5.36.0, dated 2023-10-21, and it showed up in your terminal as GIS::D...ormula(3pm) because the man page renderer decided to be mysterious about it. slay, mwah, bye πβ¨
π¦ where this page comes from
- debian trixie: libgis-distance-perl 0.20-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgis-distance-perl 0.20-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgis-distance-perl 0.20-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgis-distance-perl 0.20-1 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms