Commit 1aab0ec5 authored by gregor herrmann's avatar gregor herrmann

Imported Upstream version 0.11

parent 19a01a8b
[Changes for 0.11 - 2011-12-11]
* LICENSING CHANGE: This compilation and all individual files in it
are now under public domain with the "CC0 Universal" declaration.
* Skip fuzzy matches which are only placeholders and whitespace.
(Alex Vandiver)
[Changes for 0.10 - 2007-10-14]
* LICENSING CHANGE: This compilation and all individual files in it
......
......@@ -3,18 +3,20 @@ inc/Module/Install.pm
inc/Module/Install/Base.pm
inc/Module/Install/Can.pm
inc/Module/Install/Fetch.pm
inc/Module/Install/Include.pm
inc/Module/Install/GithubMeta.pm
inc/Module/Install/Makefile.pm
inc/Module/Install/Metadata.pm
inc/Module/Install/Package.pm
inc/Module/Install/Win32.pm
inc/Module/Install/WriteAll.pm
inc/Test/Builder.pm
inc/Test/Builder/Module.pm
inc/Test/More.pm
inc/Module/Package.pm
inc/Pod/Markdown.pm
lib/Locale/Maketext/Fuzzy.pm
Makefile.PL
MANIFEST This list of files
META.yml
README
README.mkdn
SIGNATURE
t/0-signature.t
t/1-basic.t
---
abstract: 'Maketext from already interpolated strings'
author:
- 'Audrey Tang <cpan@audreyt.org>'
build_requires:
ExtUtils::MakeMaker: 6.42
configure_requires:
ExtUtils::MakeMaker: 6.42
distribution_type: module
generated_by: 'Module::Install version 1.01'
license: unrestricted
meta-spec:
url: http://module-build.sourceforge.net/META-spec-v1.4.html
version: 1.4
module_name: Locale::Maketext::Fuzzy
name: Locale-Maketext-Fuzzy
no_index:
directory:
- inc
- t
requires:
perl: 5.005
version: 0.11
#!/usr/bin/perl
use strict;
use inc::Module::Install;
name 'Locale-Maketext-Fuzzy';
all_from 'lib/Locale/Maketext/Fuzzy.pm';
requires 'Locale::Maketext';
build_requires 'Test::More';
auto_include_deps;
auto_provides;
sign; WriteAll;
#!/usr/bin/env perl
use inc::Module::Package 'Au:dry 1';
NAME
Locale::Maketext::Fuzzy - Maketext from already interpolated strings
VERSION
This document describes version 0.10 of Locale::Maketext::Fuzzy,
released October 14, 2007.
SYNOPSIS
package MyApp::L10N;
use base 'Locale::Maketext::Fuzzy'; # instead of Locale::Maketext
......@@ -139,9 +135,9 @@ HISTORY
Output| <B>[%|loc( story.dept )%]from the [_1] dept.[%END%]</B>
Now, this layer suffers from the same linguistic problems as an ordinary
"Msgcat" or "Gettext" framework does -- what if we want to make
ordinates from "[% story.dept %]" (i.e. "from the 3rd dept."), or expand
the "dept." to "department" / "departments"?
"Msgcat" or "Gettext" framework does -- what if we want to make ordinals
from "[% story.dept %]" (i.e. "from the 3rd dept."), or expand the
"dept." to "department" / "departments"?
The same problem occurred in RT's web interface, where it had to
localize messages returned by external modules, which may already
......@@ -153,35 +149,18 @@ HISTORY
the *candidate strings*, then applied the matched string to "maketext".
Afterwards, I realized that instead of preparing a set of candidate
strings, I could actually use the original *lexicon file* (i.e. PO files
via "Locale::Maketext::Lexicon") to match against. This is how
strings, I could actually match against the original *lexicon file*
(i.e. PO files via "Locale::Maketext::Lexicon"). This is how
"Locale::Maketext::Fuzzy" was born.
AUTHORS
Audrey Tang <cpan@audreyt.org>.
COPYRIGHT
Copyright 2002, 2007 by Audrey Tang <cpan@audreyt.org>.
This software is released under the MIT license cited below.
The "MIT" License
Permission is hereby granted, free of charge, to any person obtaining a
copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:
The above copyright notice and this permission notice shall be included
in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Audrey Tang <cpan@audreyt.org>
CC0 1.0 Universal
To the extent possible under law, 唐鳳 has waived all copyright and
related or neighboring rights to Locale-Maketext-Fuzzy.
This work is published from Taiwan.
<http://creativecommons.org/publicdomain/zero/1.0>
# NAME
Locale::Maketext::Fuzzy - Maketext from already interpolated strings
# SYNOPSIS
package MyApp::L10N;
use base 'Locale::Maketext::Fuzzy'; # instead of Locale::Maketext
package MyApp::L10N::de;
use base 'MyApp::L10N';
our %Lexicon = (
# Exact match should always be preferred if possible
"0 camels were released."
=> "Exact match",
# Fuzzy match candidate
"[quant,_1,camel was,camels were] released."
=> "[quant,_1,Kamel wurde,Kamele wurden] freigegeben.",
# This could also match fuzzily, but is less preferred
"[_2] released[_1]"
=> "[_1][_2] ist frei[_1]",
);
package main;
my $lh = MyApp::L10N->get_handle('de');
# All ->maketext calls below will become ->maketext_fuzzy instead
$lh->override_maketext(1);
# This prints "Exact match"
print $lh->maketext('0 camels were released.');
# "1 Kamel wurde freigegeben." -- quant() gets 1
print $lh->maketext('1 camel was released.');
# "2 Kamele wurden freigegeben." -- quant() gets 2
print $lh->maketext('2 camels were released.');
# "3 Kamele wurden freigegeben." -- parameters are ignored
print $lh->maketext('3 released.');
# "4 Kamele wurden freigegeben." -- normal usage
print $lh->maketext('[*,_1,camel was,camels were] released.', 4);
# "!Perl ist frei!" -- matches the broader one
# Note that the sequence ([_2] before [_1]) is preserved
print $lh->maketext('Perl released!');
# DESCRIPTION
This module is a subclass of `Locale::Maketext`, with additional
support for localizing messages that already contains interpolated
variables.
This is most useful when the messages are returned by external sources
-- for example, to match `dir: command not found` against
`[_1]: command not found`.
Of course, this module is also useful if you're simply too lazy
to use the
$lh->maketext("[quant,_1,file,files] deleted.", $count);
syntax, but wish to write
$lh->maketext_fuzzy("$count files deleted");
instead, and have the correct plural form figured out automatically.
If `maketext_fuzzy` seems too long to type for you, this module
also provides a `override_maketext` method to turn _all_ `maketext`
calls into `maketext_fuzzy` calls.
# METHODS
## $lh->maketext_fuzzy(_key_[, _parameters..._]);
That method takes exactly the same arguments as the `maketext` method
of `Locale::Maketext`.
If _key_ is found in lexicons, it is applied in the same way as
`maketext`. Otherwise, it looks at all lexicon entries that could
possibly yield _key_, by turning `[...]` sequences into `(.*?)` and
match the resulting regular expression against _key_.
Once it finds all candidate entries, the longest one replaces the
_key_ for the real `maketext` call. Variables matched by its bracket
sequences (`$1`, `$2`...) are placed before _parameters_; the order
of variables in the matched entry are correctly preserved.
For example, if the matched entry in `%Lexicon` is `Test [_1]`,
this call:
$fh->maketext_fuzzy("Test string", "param");
is equivalent to this:
$fh->maketext("Test [_1]", "string", "param");
However, most of the time you won't need to supply _parameters_ to
a `maketext_fuzzy` call, since all parameters are already interpolated
into the string.
## $lh->override_maketext([_flag_]);
If _flag_ is true, this accessor method turns `$lh->maketext`
into an alias for `$lh->maketext_fuzzy`, so all consecutive
`maketext` calls in the `$lh`'s packages are automatically fuzzy.
A false _flag_ restores the original behaviour. If the flag is not
specified, returns the current status of override; the default is
0 (no overriding).
Note that this call only modifies the symbol table of the _language
class_ that `$lh` belongs to, so other languages are not affected.
If you want to override all language handles in a certain application,
try this:
MyApp::L10N->override_maketext(1);
# CAVEATS
- The "longer is better" heuristic to determine the best match is
reasonably good, but could certainly be improved.
- Currently, `"[quant,_1,file] deleted"` won't match `"3 files deleted"`;
you'll have to write `"[quant,_1,file,files] deleted"` instead, or
simply use `"[_1] file deleted"` as the lexicon key and put the correct
plural form handling into the corresponding value.
- When used in combination with `Locale::Maketext::Lexicon`'s `Tie`
backend, all keys would be iterated over each time a fuzzy match is
performed, and may cause serious speed penalty. Patches welcome.
# SEE ALSO
[Locale::Maketext](http://search.cpan.org/perldoc?Locale::Maketext), [Locale::Maketext::Lexicon](http://search.cpan.org/perldoc?Locale::Maketext::Lexicon)
# HISTORY
This particular module was written to facilitate an _auto-extraction_
layer for Slashcode's _Template Toolkit_ provider, based on
`HTML::Parser` and `Template::Parser`. It would work like this:
Input | <B>from the [% story.dept %] dept.</B>
Output| <B>[%|loc( story.dept )%]from the [_1] dept.[%END%]</B>
Now, this layer suffers from the same linguistic problems as an
ordinary `Msgcat` or `Gettext` framework does -- what if we want
to make ordinals from `[% story.dept %]` (i.e. `from the 3rd dept.`),
or expand the `dept.` to `department` / `departments`?
The same problem occurred in RT's web interface, where it had to
localize messages returned by external modules, which may already
contain interpolated variables, e.g. `"Successfully deleted 7
ticket(s) in 'c:\temp'."`.
Since I didn't have the time to refactor `DBI` and `DBI::SearchBuilder`,
I devised a `loc_match` method to pre-process their messages into one
of the _candidate strings_, then applied the matched string to `maketext`.
Afterwards, I realized that instead of preparing a set of candidate
strings, I could actually match against the original _lexicon file_
(i.e. PO files via `Locale::Maketext::Lexicon`). This is how
`Locale::Maketext::Fuzzy` was born.
# AUTHORS
Audrey Tang <cpan@audreyt.org>
# CC0 1.0 Universal
To the extent possible under law, 唐鳳 has waived all copyright and related
or neighboring rights to Locale-Maketext-Fuzzy.
This work is published from Taiwan.
[http://creativecommons.org/publicdomain/zero/1.0](http://creativecommons.org/publicdomain/zero/1.0)
\ No newline at end of file
This file contains message digests of all files listed in MANIFEST,
signed via the Module::Signature module, version 0.55.
signed via the Module::Signature module, version 0.68.
To verify the content in this distribution, first make sure you have
Module::Signature installed, then type:
......@@ -14,29 +14,31 @@ not run its Makefile.PL or Build.PL.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
SHA1 92f04788f1f083b1110a17adba16f7ea30d968f9 Changes
SHA1 24d60ed28014021c8999b0a7bf72fd8c7f968530 MANIFEST
SHA1 9613f5943856ea93e2779d6c66db39894d41dd7d Makefile.PL
SHA1 f1c92abe65e280e16e2ad5988046f452a2e5b502 README
SHA1 78edb89a439463e44c33a72bbee84c54d0dc8aaf inc/Module/Install.pm
SHA1 8ea4e37df83fd0c1c050be5c8da75545c3828d9b inc/Module/Install/Base.pm
SHA1 1da6031583c32f0d1ec073b8376102fc51427dcc inc/Module/Install/Can.pm
SHA1 b779375b90c16af2f31f38a1dd2b5df223c7f2fb inc/Module/Install/Fetch.pm
SHA1 6bf0d0d100b94d1a2ce64d010c8813dec26ac480 inc/Module/Install/Include.pm
SHA1 2054450e1e9c1dd8056362bf4a64ae70d5d71476 inc/Module/Install/Makefile.pm
SHA1 5d6189b2cad15cf9932a28faafd55130c8247e83 inc/Module/Install/Metadata.pm
SHA1 02af973fae2ac3531fa6b704574b2b8cb2a08148 inc/Module/Install/Win32.pm
SHA1 3a2eab96e91cca8d99938cda7791759ae9d97b3a inc/Module/Install/WriteAll.pm
SHA1 6ee3ac34f31857536dd77852e4dd4e21e5743607 inc/Test/Builder.pm
SHA1 9ceb21c6c29c6857f63ddfa580cedb776e7d403d inc/Test/Builder/Module.pm
SHA1 0fc9342c11d50218dfa2a71aee7443af26c99177 inc/Test/More.pm
SHA1 a82ed083ca13d73a45703f701fecd9e04a68d1b2 lib/Locale/Maketext/Fuzzy.pm
SHA1 579ccb49e2964dc987bed621a43bd4e35557abde Changes
SHA1 538423015aaec0a95230f0684fe6f643929eaf41 MANIFEST
SHA1 ce7f0fbbd97c08fe069e7cbbf1f5a01215eb277e META.yml
SHA1 9e01754121ecd53c68cb1f5b0c02ebb7b4fce959 Makefile.PL
SHA1 ba427236a1c626d098fe0a99abb0b66a5e64acc5 README
SHA1 7607f8dd40c93d4f0b9580fa59a2561589084ee4 README.mkdn
SHA1 7b4ae50ebac72d20761171c4c2b50c206344ea40 inc/Module/Install.pm
SHA1 d9fe55a427fe2fd75b5029afeeaa61b592e07f79 inc/Module/Install/Base.pm
SHA1 62d3922826d9f89f20c185e7031ac8f028504745 inc/Module/Install/Can.pm
SHA1 dc809f64fb70a26b069a36f8d3d353d520dbb7e1 inc/Module/Install/Fetch.pm
SHA1 82e6709c1cdb488770cb21f6149a7f22913cd8c1 inc/Module/Install/GithubMeta.pm
SHA1 73ab91490a628452cc140db72ef9d13a1326d211 inc/Module/Install/Makefile.pm
SHA1 8ce3f2b414e4617e6233dd4ba10830f8c5d672ec inc/Module/Install/Metadata.pm
SHA1 a815f14e3aeaa8c6f5f318cda7a2fb431b462780 inc/Module/Install/Package.pm
SHA1 3b0acd2eeac93a0afe48120f5648f0db362e5bbf inc/Module/Install/Win32.pm
SHA1 f08924f051e623f8e09fa6a121993c4a9cf7d9eb inc/Module/Install/WriteAll.pm
SHA1 5011127553463730d768e68ac9765d28d21490b1 inc/Module/Package.pm
SHA1 ccb48d3fec5ef96403f50b13eec529ce10961c02 inc/Pod/Markdown.pm
SHA1 4673f68c8a614668d68488ca173af3bfa6948d9e lib/Locale/Maketext/Fuzzy.pm
SHA1 41afe2c04bb573b40e283e2b210ed70a47a3f8ba t/0-signature.t
SHA1 ccd6690df0db3383aeb608c753c91736ab301cff t/1-basic.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.3 (Darwin)
Version: GnuPG v1.4.11 (Darwin)
iD8DBQFHEV1JtLPdNzw1AaARAgc8AJ9IHKFQ/dhp5kxO0GleP/1OCoDDngCgmq//
6AjfEy8So1NV95Cckdc4jfQ=
=OyB9
iEYEARECAAYFAk7kEqoACgkQtLPdNzw1AaDWKACfToL4CJ/cu1Cckt1lHbE8CaWg
WDcAoISo8RbTssmcyFaPmuaDoFGtQufe
=z8R5
-----END PGP SIGNATURE-----
This diff is collapsed.
#line 1
package Module::Install::Base;
$VERSION = '0.67';
use strict 'vars';
use vars qw{$VERSION};
BEGIN {
$VERSION = '1.01';
}
# Suspend handler for "redefined" warnings
BEGIN {
......@@ -9,52 +13,61 @@ BEGIN {
$SIG{__WARN__} = sub { $w };
}
### This is the ONLY module that shouldn't have strict on
# use strict;
#line 41
#line 42
sub new {
my ($class, %args) = @_;
foreach my $method ( qw(call load) ) {
*{"$class\::$method"} = sub {
shift()->_top->$method(@_);
} unless defined &{"$class\::$method"};
}
bless( \%args, $class );
my $class = shift;
unless ( defined &{"${class}::call"} ) {
*{"${class}::call"} = sub { shift->_top->call(@_) };
}
unless ( defined &{"${class}::load"} ) {
*{"${class}::load"} = sub { shift->_top->load(@_) };
}
bless { @_ }, $class;
}
#line 61
sub AUTOLOAD {
my $self = shift;
local $@;
my $autoload = eval { $self->_top->autoload } or return;
goto &$autoload;
local $@;
my $func = eval { shift->_top->autoload } or return;
goto &$func;
}
#line 76
#line 75
sub _top { $_[0]->{_top} }
sub _top {
$_[0]->{_top};
}
#line 89
#line 90
sub admin {
$_[0]->_top->{admin} or Module::Install::Base::FakeAdmin->new;
$_[0]->_top->{admin}
or
Module::Install::Base::FakeAdmin->new;
}
#line 106
sub is_admin {
$_[0]->admin->VERSION;
! $_[0]->admin->isa('Module::Install::Base::FakeAdmin');
}
sub DESTROY {}
package Module::Install::Base::FakeAdmin;
my $Fake;
sub new { $Fake ||= bless(\@_, $_[0]) }
use vars qw{$VERSION};
BEGIN {
$VERSION = $Module::Install::Base::VERSION;
}
my $fake;
sub new {
$fake ||= bless(\@_, $_[0]);
}
sub AUTOLOAD {}
......@@ -67,4 +80,4 @@ BEGIN {
1;
#line 138
#line 159
......@@ -2,18 +2,16 @@
package Module::Install::Can;
use strict;
use Module::Install::Base;
use Config ();
### This adds a 5.005 Perl version dependency.
### This is a bug and will be fixed.
use File::Spec ();
use ExtUtils::MakeMaker ();
use vars qw{$VERSION $ISCORE @ISA};
use Config ();
use File::Spec ();
use ExtUtils::MakeMaker ();
use Module::Install::Base ();
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.67';
$VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
# check if we can load some module
......@@ -39,6 +37,7 @@ sub can_run {
return $_cmd if (-x $_cmd or $_cmd = MM->maybe_command($_cmd));
for my $dir ((split /$Config::Config{path_sep}/, $ENV{PATH}), '.') {
next if $dir eq '';
my $abs = File::Spec->catfile($dir, $_[1]);
return $abs if (-x $abs or $abs = MM->maybe_command($abs));
}
......@@ -79,4 +78,4 @@ if ( $^O eq 'cygwin' ) {
__END__
#line 157
#line 156
......@@ -2,24 +2,24 @@
package Module::Install::Fetch;
use strict;
use Module::Install::Base;
use Module::Install::Base ();
use vars qw{$VERSION $ISCORE @ISA};
use vars qw{$VERSION @ISA $ISCORE};
BEGIN {
$VERSION = '0.67';
$VERSION = '1.01';
@ISA = 'Module::Install::Base';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub get_file {
my ($self, %args) = @_;
my ($scheme, $host, $path, $file) =
my ($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
if ( $scheme eq 'http' and ! eval { require LWP::Simple; 1 } ) {
$args{url} = $args{ftp_url}
or (warn("LWP support unavailable!\n"), return);
($scheme, $host, $path, $file) =
($scheme, $host, $path, $file) =
$args{url} =~ m|^(\w+)://([^/]+)(.+)/(.+)| or return;
}
......
#line 1
package Module::Install::GithubMeta;
use strict;
use warnings;
use Cwd;
use base qw(Module::Install::Base);
use vars qw($VERSION);
$VERSION = '0.12';
sub githubmeta {
my $self = shift;
return unless $Module::Install::AUTHOR;
return unless _under_git();
return unless $self->can_run('git');
return unless my ($git_url) = `git remote show -n origin` =~ /URL: (.*)$/m;
return unless $git_url =~ /github\.com/; # Not a Github repository
my $http_url = $git_url;
$git_url =~ s![\w\-]+\@([^:]+):!git://$1/!;
$http_url =~ s![\w\-]+\@([^:]+):!http://$1/!;
$http_url =~ s!\.git$!/tree!;
$self->repository(
{
type => 'git',
url => $git_url,
web => $http_url,
},
);
$self->homepage( $http_url ) unless $self->homepage();
return 1;
}
sub _under_git {
return 1 if -e '.git';
my $cwd = getcwd;
my $last = $cwd;
my $found = 0;
while (1) {
chdir '..' or last;
my $current = getcwd;
last if $last eq $current;
$last = $current;
if ( -e '.git' ) {
$found = 1;
last;
}
}
chdir $cwd;
return $found;
}
'Github';
__END__
#line 114
#line 1
package Module::Install::Include;
use strict;
use Module::Install::Base;
use vars qw{$VERSION $ISCORE @ISA};
BEGIN {
$VERSION = '0.67';
$ISCORE = 1;
@ISA = qw{Module::Install::Base};
}
sub include {
shift()->admin->include(@_);
}
sub include_deps {
shift()->admin->include_deps(@_);
}
sub auto_include {
shift()->admin->auto_include(@_);
}
sub auto_include_deps {
shift()->admin->auto_include_deps(@_);
}
sub auto_include_dependent_dists {
shift()->admin->auto_include_dependent_dists(@_);
}
1;
This diff is collapsed.
This diff is collapsed.
#line 1
##
# name: Module::Install::Package
# abstract: Module::Install support for Module::Package
# author: Ingy döt Net <ingy@cpan.org>
# license: perl
# copyright: 2011
# see:
# - Module::Package
# This module contains the Module::Package logic that must be available to
# both the Author and the End User. Author-only logic goes in a
# Module::Package::Plugin subclass.
package Module::Install::Package;
use strict;
use Module::Install::Base;
use vars qw'@ISA $VERSION';
@ISA = 'Module::Install::Base';
$VERSION = '0.26';
#-----------------------------------------------------------------------------#
# XXX BOOTBUGHACK
# This is here to try to get us out of Module-Package-0.11 cpantesters hell...
# Remove this when the situation has blown over.
sub pkg {
*inc::Module::Package::VERSION = sub { $VERSION };
my $self = shift;
$self->module_package_internals_init($@);
}
#-----------------------------------------------------------------------------#
# We allow the author to specify key/value options after the plugin. These
# options need to be available both at author time and install time.
#-----------------------------------------------------------------------------#
# OO accessor for command line options:
sub package_options {
@_>1?($_[0]->{package_options}=$_[1]):$_[0]->{package_options}}
my $default_options = {
deps_list => 1,
install_bin => 1,
install_share => 1,
manifest_skip => 1,
requires_from => 1,
};
#-----------------------------------------------------------------------------#
# Module::Install plugin directives. Use long, ugly names to not pollute the
# Module::Install plugin namespace. These are only intended to be called from
# Module::Package.
#-----------------------------------------------------------------------------#
# Module::Package starts off life as a normal call to this Module::Install
# plugin directive:
my $module_install_plugin;
my $module_package_plugin;
# XXX ARGVHACK This @argv thing is a temporary fix for an ugly bug somewhere in the
# Wikitext module usage.
my @argv;
sub module_package_internals_init {
my $self = $module_install_plugin = shift;
my ($plugin_spec, %options) = @_;
$self->package_options({%$default_options, %options});
if ($module_install_plugin->is_admin) {
$module_package_plugin = $self->_load_plugin($plugin_spec);
$module_package_plugin->mi($module_install_plugin);
$module_package_plugin->version_check($VERSION);
}
# NOTE - This is the point in time where the body of Makefile.PL runs...
return;
sub INIT {
return unless $module_install_plugin;
return if $Module::Package::ERROR;
eval {
if ($module_install_plugin->is_admin) {
$module_package_plugin->initial();
$module_package_plugin->main();
}
else {
$module_install_plugin->_initial();
$module_install_plugin->_main();
}
};
if ($@) {
$Module::Package::ERROR = $@;
die $@;
}
@argv = @ARGV; # XXX ARGVHACK
}