Skip to content

Commit

Permalink
A new look for your Makefile.PL
Browse files Browse the repository at this point in the history
Hi Audrey!!

A present for you...

I just took some time to convert your setup to Module::Package.

I had to put out a new M:P version with a Unicode tweak for the Chinese package name.

I also had to alter your code slightly to account for missing code in M:I.

So consider this a rough draft. I hope you release it, and then work with me to make it better, a step at a time.

Cheers! Ingy
  • Loading branch information
ingydotnet committed Jun 13, 2011
1 parent 34a5350 commit 36f80b4
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 23 deletions.
25 changes: 4 additions & 21 deletions Makefile.PL
Original file line number Diff line number Diff line change
@@ -1,22 +1,5 @@
#!/usr/local/bin/perl

use v5.12.0;
use inc::Module::Install;

name 'App-Uni';
license 'CC0';
requires 'File::ShareDir';

given ('lib/App/Uni.pm') {
all_from $_;
readme_from $_;
readme_markdown_from $_;
}

repository 'http://github.com/audreyt/app-uni';
install_script 'bin/uni';
install_share 'share';

sign; WriteAll;

1;
use utf8;
# to pick up M:P:Au for now...
use lib 'lib';
use inc::Module::Package 'Au:現代 0.01';
6 changes: 4 additions & 2 deletions lib/App/Uni.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
use v5.12.0;
package App::Uni v0.14.0;
# package App::Uni v0.14.0; # XXX Confuses M:I
package App::Uni;
our $VERSION = 'v0.14.0';
use open ':std' => ':utf8';
use File::ShareDir 'dist_dir';
use File::ShareDir 1.03 'dist_dir';

sub main {
my $dir = dist_dir('App-Uni');
Expand Down
31 changes: 31 additions & 0 deletions lib/Module/Package/Au.pm
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
use v5.12.0;
use utf8;
use strict;
package Module::Package::Au;

our $VERSION = '0.01';

use Module::Package 0.24 ();
use Module::Install::GithubMeta 0.10 ();
use Module::Install::ReadmeFromPod 0.12 ();
use Module::Install::ReadmeMarkdownFromPod 0.03 ();
use Pod::Markdown 1.110730 ();


package Module::Package::Au::現代;
use Module::Package::Plugin;
our @ISA = 'Module::Package::Plugin';

sub main {
my ($self) = @_;

$self->mi->license('CC0');
$self->mi->readme_from($self->pod_or_pm_file);
$self->mi->readme_markdown_from($self->pod_or_pm_file);
$self->mi->sign; # XXX Not sure it this needs to be post_all_from
$self->mi->clean_files('README.mkdn');

$self->post_all_from(sub {$self->mi->githubmeta});
}

1;

0 comments on commit 36f80b4

Please sign in to comment.