Acme-Shukugawa-Atom
view release on metacpan or search on metacpan
inc/Module/AutoInstall.pm view on Meta::CPAN
$success = 0;
}
$installed += $success;
} else {
print << ".";
*** Could not find a version $ver or above for $pkg; skipping.
.
}
MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall;
}
return $installed;
}
sub _cpanplus_config {
my @config = ();
while ( @_ ) {
my ($key, $value) = (shift(), shift());
if ( $key eq 'prerequisites_policy' ) {
inc/Module/AutoInstall.pm view on Meta::CPAN
}
$installed += $success;
}
else {
print << ".";
*** Could not find a version $ver or above for $pkg; skipping.
.
}
MY::postinstall( $pkg, $ver, $success ) if defined &MY::postinstall;
}
return $installed;
}
sub _has_cpanplus {
return (
$HasCPANPLUS = (
$INC{'CPANPLUS/Config.pm'}
or _load('CPANPLUS::Shell::Default')
inc/Module/AutoInstall.pm view on Meta::CPAN
*** Makefile not written in check-only mode.
.
return;
}
my %args = _make_args(@_);
no strict 'refs';
$PostambleUsed = 0;
local *MY::postamble = \&postamble unless defined &MY::postamble;
ExtUtils::MakeMaker::WriteMakefile(%args);
print << "." unless $PostambleUsed;
*** WARNING: Makefile written with customized MY::postamble() without
including contents from Module::AutoInstall::postamble() --
auto installation features disabled. Please contact the author.
.
return 1;
}
sub postamble {
$PostambleUsed = 1;
return << ".";
config :: installdeps
\t\$(NOECHO) \$(NOOP)
checkdeps ::
\t\$(PERL) $0 --checkdeps
inc/Module/Install/AutoInstall.pm view on Meta::CPAN
Module::AutoInstall->import(
(@config ? (-config => \@config) : ()),
(@core ? (-core => \@core) : ()),
$self->features,
);
$self->makemaker_args( Module::AutoInstall::_make_args() );
my $class = ref($self);
$self->postamble(
"# --- $class section:\n" .
Module::AutoInstall::postamble()
);
}
sub auto_install_now {
my $self = shift;
$self->auto_install(@_);
Module::AutoInstall::do_install();
}
1;
inc/Module/Install/Makefile.pm view on Meta::CPAN
sub fix_up_makefile {
my $self = shift;
my $makefile_name = shift;
my $top_class = ref($self->_top) || '';
my $top_version = $self->_top->VERSION || '';
my $preamble = $self->preamble
? "# Preamble by $top_class $top_version\n"
. $self->preamble
: '';
my $postamble = "# Postamble by $top_class $top_version\n"
. ($self->postamble || '');
local *MAKEFILE;
open MAKEFILE, "< $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
my $makefile = do { local $/; <MAKEFILE> };
close MAKEFILE or die $!;
$makefile =~ s/\b(test_harness\(\$\(TEST_VERBOSE\), )/$1'inc', /;
$makefile =~ s/( -I\$\(INST_ARCHLIB\))/ -Iinc$1/g;
$makefile =~ s/( "-I\$\(INST_LIB\)")/ "-Iinc"$1/g;
$makefile =~ s/^(FULLPERL = .*)/$1 "-Iinc"/m;
inc/Module/Install/Makefile.pm view on Meta::CPAN
$makefile =~ s/^PERL_LIB = .+/PERL_LIB =/m;
#$makefile =~ s/^PERL_ARCHLIB = .+/PERL_ARCHLIB =/m;
# Perl 5.005 mentions PERL_LIB explicitly, so we have to remove that as well.
$makefile =~ s/("?)-I\$\(PERL_LIB\)\1//g;
# XXX - This is currently unused; not sure if it breaks other MM-users
# $makefile =~ s/^pm_to_blib\s+:\s+/pm_to_blib :: /mg;
open MAKEFILE, "> $makefile_name" or die "fix_up_makefile: Couldn't open $makefile_name: $!";
print MAKEFILE "$preamble$makefile$postamble" or die $!;
close MAKEFILE or die $!;
1;
}
sub preamble {
my ($self, $text) = @_;
$self->{preamble} = $text . $self->{preamble} if defined $text;
$self->{preamble};
}
sub postamble {
my ($self, $text) = @_;
$self->{postamble} ||= $self->admin->postamble;
$self->{postamble} .= $text if defined $text;
$self->{postamble}
}
1;
__END__
#line 363
inc/Module/Install/Share.pm view on Meta::CPAN
}
sub install_share {
my ($self, $dir) = @_;
if ( ! defined $dir ) {
die "Cannot find the 'share' directory" unless -d 'share';
$dir = 'share';
}
$self->postamble(<<"END_MAKEFILE");
config ::
\t\$(NOECHO) \$(MOD_INSTALL) \\
\t\t"$dir" \$(INST_AUTODIR)
END_MAKEFILE
# The above appears to behave incorrectly when used with old versions
# of ExtUtils::Install (known-bad on RHEL 3, with 5.8.0)
# So when we need to install a share directory, make sure we add a
# dependency on a moderately new version of ExtUtils::MakeMaker.
lib/Acme/Shukugawa/Atom.pm view on Meta::CPAN
if (! ref $self) {
$self = $self->new({ custom_words => \@DEFAULT_WORDS, @_ });
}
# Create local RE_EXCEPTION
local $RE_EXCEPTION = $self->_create_exception_re;
$self->preprocess(\$string);
$self->runthrough(\$string);
$self->postprocess(\$string);
return $string;
}
sub preprocess
{
my ($self, $strref) = @_;
my $custom = $self->custom_words;
for(0..(scalar(@$custom) - 1)/2) {
lib/Acme/Shukugawa/Atom.pm view on Meta::CPAN
} elsif ($yomi) {
$ret .= $self->atomize($yomi) || $surface;
} else {
$ret .= $surface;
}
}
}
$$strref = $ret;
}
sub postprocess {}
# ã·ã¼ã¹ã¼ã«ã¼ã«
# 寿å¸âã·ã¼ã¹ã¼
# ã³ããæå¾ã ã£ããã²ã£ããè¿ããªã
sub apply_shisu_rule
{
my ($self, $yomi) = @_;
return $yomi if $yomi =~ s{^($RE_SYLLABLE)($RE_SYLLABLE)$}{
my ($a, $b) = ($1, $2);
$a =~ s/ã¼$//;
( run in 1.627 second using v1.01-cache-2.11-cpan-5735350b133 )