The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
# This file was automatically generated by Dist::Zilla::Plugin::MakeMaker v6.008.
use strict;
use warnings;

use 5.010001;

use ExtUtils::MakeMaker;

my %WriteMakefileArgs = (
  "ABSTRACT" => "CLIs related to Indonesian banking",
  "AUTHOR" => "perlancar <perlancar\@cpan.org>",
  "CONFIGURE_REQUIRES" => {
    "ExtUtils::MakeMaker" => 0
  },
  "DISTNAME" => "App-IndonesianBankingUtils",
  "EXE_FILES" => [
    "bin/download-bca",
    "bin/download-mandiri",
    "bin/list-bca-branches",
    "bin/list-id-bank-cards",
    "bin/list-id-banks",
    "bin/list-mandiri-branches",
    "bin/parse-bca-account",
    "bin/parse-bca-statement",
    "bin/parse-bprks-statement",
    "bin/parse-mandiri-account",
    "bin/parse-mandiri-statement"
  ],
  "LICENSE" => "perl",
  "MIN_PERL_VERSION" => "5.010001",
  "NAME" => "App::IndonesianBankingUtils",
  "PREREQ_PM" => {
    "Business::BankCard::Indonesia" => 0,
    "Business::BankList::Indonesia" => 0,
    "Business::ID::BCA" => 0,
    "Business::ID::Mandiri" => 0,
    "Data::Sah::Compiler::perl::TH::array" => 0,
    "Data::Sah::Compiler::perl::TH::bool" => 0,
    "Data::Sah::Compiler::perl::TH::int" => 0,
    "Data::Sah::Compiler::perl::TH::str" => 0,
    "File::HomeDir" => 0,
    "File::Path" => 0,
    "File::Slurper" => 0,
    "Finance::Bank::ID::BCA" => "0.44",
    "Finance::Bank::ID::BPRKS" => 0,
    "Finance::Bank::ID::Mandiri" => 0,
    "Log::Any::App" => "0.52",
    "Log::Any::IfLOG" => "0.07",
    "Perinci::CmdLine::Any" => "0.09",
    "Perinci::CmdLine::Base" => "1.72",
    "Perinci::CmdLine::Classic" => "1.71",
    "Perinci::CmdLine::Lite" => "1.72",
    "Perinci::Sub::Property::result::table" => 0,
    "YAML" => 0,
    "YAML::Syck" => 0,
    "strict" => 0,
    "warnings" => 0
  },
  "TEST_REQUIRES" => {
    "File::Spec" => 0,
    "IO::Handle" => 0,
    "IPC::Open3" => 0,
    "Test::More" => 0
  },
  "VERSION" => "0.08",
  "test" => {
    "TESTS" => "t/*.t"
  }
);


my %FallbackPrereqs = (
  "Business::BankCard::Indonesia" => 0,
  "Business::BankList::Indonesia" => 0,
  "Business::ID::BCA" => 0,
  "Business::ID::Mandiri" => 0,
  "Data::Sah::Compiler::perl::TH::array" => 0,
  "Data::Sah::Compiler::perl::TH::bool" => 0,
  "Data::Sah::Compiler::perl::TH::int" => 0,
  "Data::Sah::Compiler::perl::TH::str" => 0,
  "File::HomeDir" => 0,
  "File::Path" => 0,
  "File::Slurper" => 0,
  "File::Spec" => 0,
  "Finance::Bank::ID::BCA" => "0.44",
  "Finance::Bank::ID::BPRKS" => 0,
  "Finance::Bank::ID::Mandiri" => 0,
  "IO::Handle" => 0,
  "IPC::Open3" => 0,
  "Log::Any::App" => "0.52",
  "Log::Any::IfLOG" => "0.07",
  "Perinci::CmdLine::Any" => "0.09",
  "Perinci::CmdLine::Base" => "1.72",
  "Perinci::CmdLine::Classic" => "1.71",
  "Perinci::CmdLine::Lite" => "1.72",
  "Perinci::Sub::Property::result::table" => 0,
  "Test::More" => 0,
  "YAML" => 0,
  "YAML::Syck" => 0,
  "strict" => 0,
  "warnings" => 0
);


unless ( eval { ExtUtils::MakeMaker->VERSION(6.63_03) } ) {
  delete $WriteMakefileArgs{TEST_REQUIRES};
  delete $WriteMakefileArgs{BUILD_REQUIRES};
  $WriteMakefileArgs{PREREQ_PM} = \%FallbackPrereqs;
}

delete $WriteMakefileArgs{CONFIGURE_REQUIRES}
  unless eval { ExtUtils::MakeMaker->VERSION(6.52) };

WriteMakefile(%WriteMakefileArgs);

# modify generated Makefile to generate shell completion scripts. this piece
# is generated by Dist::Zilla::Plugin::GenShellCompletion version 0.11.
GEN_SHELL_COMPLETION:
{
    last unless grep { $^O eq $_ } ("aix","beos","cygwin","darwin","dragonfly","freebsd","gnukfreebsd","haiku","hpux","interix","irix","linux","midnightbsd","minix","mirbsd","netbsd","openbsd","sco","solaris");

    print "Modifying Makefile to generate shell completion on install\n";
    open my($fh), "<", "Makefile" or die "Can't open generated Makefile: $!";
    my $content = do { local $/; ~~<$fh> };

    $content =~ s/^(install :: pure_install doc_install)/$1 comp_install/m
        or die "Can't find pattern in Makefile (1)";

    $content =~ s/^(uninstall :: .+)/$1 comp_uninstall/m
        or die "Can't find pattern in Makefile (2)";

    $content .= qq|\ncomp_install :\n\t| .
        q|$(PERLRUN) -E'if(eval { require App::shcompgen; 1 }) { system "shcompgen", "--verbose", "generate", "--replace", ($$App::shcompgen::VERSION >= 0.15 ? ("--remove"):()), @ARGV }' -- $(EXE_FILES)| .
        qq|\n\n|;

    $content .= qq|\ncomp_uninstall :\n\t| .
        q|$(PERLRUN) -E'if(eval { require App::shcompgen; 1 }) { system "shcompgen", "--verbose", "remove", @ARGV }' -- $(EXE_FILES)| .
        qq|\n\n|;

    open $fh, ">", "Makefile" or die "Can't write modified Makefile: $!";
    print $fh $content;
}