in reply to Problem File::ShareDir::Install
Um, what documentation are you reading? Read the synopsis, you're missing the postamble
patch -p1 -i Tshare.diff
diff -ruN not/notexist/lib/Tshare.pm not/Tshare/lib/Tshare.pm --- not/notexist/lib/Tshare.pm 1969-12-31 16:00:00.000000000 -0800 +++ not/Tshare/lib/Tshare.pm 2012-03-14 07:17:29.875000000 -0700 @@ -0,0 +1,8 @@ +package Tshare; +$Tshare::VERSION = 0.01; +use File::ShareDir ':ALL'; +my $dir = dist_dir('Tshare'); +chdir $dir; +print $dir,$/; +print $_,$/ for glob '*'; +1; diff -ruN not/notexist/Makefile.PL not/Tshare/Makefile.PL --- not/notexist/Makefile.PL 1969-12-31 16:00:00.000000000 -0800 +++ not/Tshare/Makefile.PL 2012-03-14 07:18:12.875000000 -0700 @@ -0,0 +1,12 @@ +#!/usr/bin/perl -- +use ExtUtils::MakeMaker; +use File::ShareDir::Install; +install_share; # default +#~ install_share 'share'; # same as default +#~ install_share 'dist', 'share'; # same as default +WriteMakefile( + NAME => 'Tshare', + VERSION_FROM => 'lib/Tshare.pm', # finds $VERSION +); +package MY; +use File::ShareDir::Install qw(postamble); diff -ruN not/notexist/share/file.txt not/Tshare/share/file.txt --- not/notexist/share/file.txt 1969-12-31 16:00:00.000000000 -0800 +++ not/Tshare/share/file.txt 2012-03-14 07:17:29.875000000 -0700 @@ -0,0 +1 @@ +ECHO is on.
$ perl Makefile.PL INSTALL_BASE=frackus Writing Makefile for Tshare Writing MYMETA.yml and MYMETA.json $ dmake install dmake: Warning: -- Target [blibdirs] was made but the time stamp has +not been updated. dmake: Warning: -- Target [config] was made but the time stamp has no +t been updated. cp share\file.txt blib\lib\auto\share\dist\Tshare\file.txt cp lib/Tshare.pm blib\lib\Tshare.pm dmake: Warning: -- Target [dynamic] was made but the time stamp has n +ot been updated. dmake: Warning: -- Target [pure_all] was made but the time stamp has +not been updated. Appending installation info to frackus\lib\perl5\MSWin32-x86-multi-thr +ead/perllocal.pod $ perl -Ifrackus/lib/perl5 -MTshare -e 1 frackus\lib\perl5\auto\share\dist\Tshare file.txt
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Problem File::ShareDir::Install
by Swalif (Scribe) on Mar 14, 2012 at 16:31 UTC |