#!/usr/bin/env perl use v5.30.0; use strict; use warnings; use Path::Tiny qw/path/; my $current_dir = path(__FILE__)->parent->parent->child('lib'); $current_dir->visit( sub { my ( $path, $state ) = @_; if ( -f $path ) { return if $path !~ /\.pm$/; system mkdir => '-pv', 'doc/' . $path->parent; system pod2html => $path, '-o', 'doc/' . $path . '.html', '--htmldir', $current_dir->child('./doc')->realpath, '--podpath', 'lib', '--recurse'; } }, { recurse => 1 } );