Plack:...lServer(3pm)
π¦ Plack::Test::ExternalServer π¦
okay bestie, real talk: this is the Plack:...lServer(3pm) page from the User Contributed Perl Documentation, and it's lowkey iconic. she's short, she's sweet, she lets you point your whole test suite at a server that's actually alive. let's get into it π
β¨ NAME β¨
Plack::Test::ExternalServer β Run HTTP tests on external live servers
no cap, that's the whole job. she tests live servers. periodt.
πΈ VERSION πΈ
version 0.02
tiny number, big energy. π
π SYNOPSIS π
$ PLACK_TEST_IMPL=Plack::Test::ExternalServer \
PLACK_TEST_EXTERNALSERVER_URI=http://myhost.example/myapp/ \
perl my_plack_test.t
see how we just... set two env vars and go? the way that works is so satisfying. no local server spawning, no mocking, just vibes and a real URL. π«Ά
π DESCRIPTION π
so here's the tea: this module lets you run your Plack::Test tests against an external server instead of only against a local application β and by "only against a local application" I mean through either mocked HTTP or a locally spawned server. both of those are cute, but sometimes you wanna hit the real thing, y'know?
if you wanna know how to actually write tests that can use this module, go read Plack::Test. she's the main character here, this module is just the glow-up. β¨
π ENVIRONMENT VARIABLES π
PLACK_TEST_EXTERNALSERVER_URIβ the value you put here gets used as the base uri for requests to the external server. that's it, that's the whole variable. she's simple and she's powerful. π
π SEE ALSO π
Plack::TestPlack::Test::ServerPlack::Test::MockHTTP
the whole friend group fr fr. go say hi. π¦
β AUTHOR β
Florian Ragwitz <rafl@debian.org>
π CONTRIBUTOR π
Karen Etheridge <ether@cpan.org>
π COPYRIGHT AND LICENSE π
This software is copyright (c) 2010 by Florian Ragwitz.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
so like... yes, you can remix it, redistribute it, whatever β just keep it under the same terms as Perl 5 itself. respect the license, bestie. π
okay that's the whole page!! this was perl v5.36.0, dated 2022-11-20, served up fresh from Plack:...lServer(3pm) β mwah, go write some tests against a live server, you absolute legend π
ππΈ
π¦ where this page comes from
- debian bookworm: libplack-test-externalserver-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libplack-test-externalserver-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libplack-test-externalserver-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libplack-test-externalserver-perl 0.02-3 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libplack-test-externalserver-perl 0.02-3 Β· 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