GeoIP2...eneric(3pm)
β¨ NAME β¨
GeoIP2::Error::Generic β bestie, it's literally just a generic exception π
It lives in the User Contributed Perl Documentation corner of your man pages, and no cap, it does exactly one job: be a vibe. A sad vibe. An error vibe. π«Ά
π VERSION π
version 2.006002 β iconic, numbered, frozen in time β
πΈ SYNOPSIS πΈ
okay so here's the whole situation in code form, verbatim, don't touch it:
use 5.008;
use GeoIP2::WebService::Client;
use Scalar::Util qw( blessed );
use Try::Tiny;
my $client = GeoIP2::WebService::Client->new(
account_id => 42,
license_key => 'abcdef123456',
);
try {
$client->insights( ip => '24.24.24.24' );
}
catch {
die $_ unless blessed $_;
die $_ if $_->isa('GeoIP2::Error::Generic');
# handle other exceptions
};
so yeah β you try the thing, you catch the thing, and if the thing that got caught is a GeoIP2::Error::Generic, you deal with it. if it's not even blessed, you just die right on through. it's giving "sort your exceptions before you panic" π¦
π DESCRIPTION π
This class represents a generic error. Periodt. β¨
It extends Throwable::Error and β this is the key part β it does not add any additional attributes. Not one. Zero. It is a pure, minimal, unbothered little exception. Main character energy, absolutely no baggage π
π§ METHODS π§
This class has two methods, and I need you to know their names exactly:
$error->message()$error->stack_trace()
Both methods are inherited from Throwable::Error. So like, this class didn't even write them, it just shows up looking cute and reaps the benefits π
π₯ SUPPORT π₯
Bugs may be submitted through <https://github.com/maxmind/GeoIP2-perl/issues>.
(no links on my watch β you get the URL raw, bestie, copy-paste it yourself π«Ά)
π AUTHORS π
the legends, in order:
- Dave Rolsky <drolsky@maxmind.com>
- Greg Oschwald <goschwald@maxmind.com>
- Mark Fowler <mfowler@maxmind.com>
- Olaf Alders <oalders@maxmind.com>
four whole authors for a class that adds zero attributes and I respect that so much ππ
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2013 - 2019 by MaxMind, Inc.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
and that's the whole page, bestie π this little manual lives in perl v5.36.0, dated 2022-11-21, filed under GeoIP2...eneric(3pm) β slay, go write some try/catch blocks, ily, bye ππΈ
π¦ where this page comes from
- debian bookworm: libgeoip2-perl 2.006002-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libgeoip2-perl 2.006002-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libgeoip2-perl 2.006002-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libgeoip2-perl 2.006002-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libgeoip2-perl 2.006002-2 Β· 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