Net-Async-Authentik
view release on metacpan or search on metacpan
docs/superpowers/plans/2026-10-04-net-async-authentik-phase-1.md view on Meta::CPAN
Kopie von `~/dev/p5-www-authentik/t/lib/FakeAuthentik.pm`, unverändert bis auf einen
Kopfkommentar, der sagt, woher sie stammt und dass beide gleich bleiben müssen. Eine
Testdatei lässt sich nicht als Abhängigkeit beziehen, deshalb die Kopie â wie bei
`Net::Async::Keycloak`. Dazu in `t/00-load.t` eine Prüfung, die die beiden Dateien
vergleicht, wenn die Sync-Dist daneben ausgecheckt ist, und sonst übersprungen wird:
```perl
my $sync = $ENV{WWW_AUTHENTIK_DIR} || "$ENV{HOME}/dev/p5-www-authentik";
SKIP: {
skip 'the sync distribution is not checked out next door', 1 unless -f "$sync/t/lib/FakeAuthentik.pm";
my $here = do { local ( @ARGV, $/ ) = 't/lib/FakeAuthentik.pm'; <> };
my $there = do { local ( @ARGV, $/ ) = "$sync/t/lib/FakeAuthentik.pm"; <> };
# the header comment differs on purpose; everything from `use strict` on must not
is( ( $here =~ s/\A.*?^use strict;/use strict;/smr ), ( $there =~ s/\A.*?^use strict;/use strict;/smr ),
'the fake authentik has not drifted from the sync distribution' );
}
```
- [ ] **Step 2: `t/lib/FakeHTTP.pm` schreiben**
```perl
package FakeHTTP;
t/00-load.t view on Meta::CPAN
use_ok($_);
}
# t/lib/FakeAuthentik.pm is a copy of the synchronous distribution's, because
# a test file cannot be pulled in as a dependency. When that checkout is next
# door, the two must still be the same file.
my $sync = $ENV{WWW_AUTHENTIK_DIR} || "$ENV{HOME}/dev/p5-www-authentik";
SKIP: {
skip 'the synchronous distribution is not checked out next door', 1
unless -f "$sync/t/lib/FakeAuthentik.pm";
my $here = do { local ( @ARGV, $/ ) = 't/lib/FakeAuthentik.pm'; <> };
my $there = do { local ( @ARGV, $/ ) = "$sync/t/lib/FakeAuthentik.pm"; <> };
# the header comment differs on purpose, everything from `use strict` must not
my $body = sub { $_[0] =~ s/\A.*?^use strict;/use strict;/smr };
is( $body->($here), $body->($there), 'the fake authentik has not drifted from the synchronous distribution' );
}
done_testing;
( run in 0.862 second using v1.01-cache-2.11-cpan-ac8be02dad9 )