On Fri Dec 19 11:28:56 2014, ETJ wrote:
Show quoted text> Are you generating the .pm under blib? The idiomatic thing to do is
> generate in its normal location, and then EUMM will install it under
> blib and pod2man it as normal.
>
> Please give us a bit of code that actually demonstrates the problem.
Ok, here is a beginning of Systend::Daemon.pm:
Show quoted text> package Systemd::Daemon;
>
> =head1 NAME
>
> Systemd::Daemon — ...
>
> =head1 VERSION
>
> Version __VERSION__.
>
> =cut
>
> our $VERSION = '__VERSION__';
>
> use Inline
> C => 'DATA',
> name => __PACKAGE__,
> version => '__VERSION__';
>
> Inline->init();
>
> ...
Here is a part of Makefile.PL:
Show quoted text> my $version = '0.01';
> WriteMakefile(
> NAME => 'Systemd::Daemon',
> VERSION => $version,
> PM_FILTER => "$^X -p -e \"s{__VERSION__}{$version}g;\"",
Tests 00-load.t (generated by module-starter):
Show quoted text> #!perl -T
> use 5.006;
> use strict;
> use warnings FATAL => 'all';
> use Test::More;
> plan tests => 1;
> BEGIN {
> use_ok( 'Systemd::Daemon' ) || print "Bail out!\n";
> }
> diag( "Testing Systemd::Daemon $Systemd::Daemon::VERSION, Perl $], $^X" );
prints version 0.01, as expected:
Show quoted text> $ make test TEST_FILES='t/00-load.t'
> PERL_DL_NONLAZY=1 "/usr/bin/perl" "-MExtUtils::Command::MM" "-MTest::Harness" "-e" "undef *Test::Harness::Switches; test_harness(0, 'blib/lib', 'blib/arch')" t/00-load.t
> t/00-load.t .. 1/? # Testing Systemd::Daemon 0.01, Perl 5.018004, /usr/bin/perl
> t/00-load.t .. ok
> All tests successful.
> Files=1, Tests=1, 0 wallclock secs ( 0.03 usr 0.00 sys + 0.07 cusr 0.01 csys = 0.11 CPU)
> Result: PASS
But man page:
Show quoted text> $ man blib/man3/Systemd\:\:Daemon.3pm
>
> Systemd::Daemon(3) User Contributed Perl Documentation
>
> NAME
> Systemd::Daemon - ...
>
> VERSION
> Version __VERSION__.
> ...