CPAN-Maker-Bootstrapper

 view release on metacpan or  search on metacpan

lib/CPAN/Maker/Bootstrapper/ConfigReader.pm  view on Meta::CPAN

stubs and F<buildspec.yml>.

=item C<email>

Your email address. Used in generated module stubs, F<buildspec.yml>,
and the bugtracker C<mailto> field when C<--resources github> is
specified.

=item C<github>

Your GitHub username. Used to construct repository, homepage, and
bugtracker URLs when C<--resources github> is specified.

=back

=head2 [cpan-maker]

  [cpan-maker]
      basedir            = /home/you/git
      resources          = github
      syntax-checking    = on
      perltidyrc         = /home/you/.perltidyrc
      perlcriticrc       = /home/you/.perlcriticrc
      llm-api-key-helper = cat ~/.ssh/anthropic-api-key
      max-tokens         = 4096

=over 4

=item C<basedir>

The directory in which new projects are created. Equivalent to passing
C<--basedir> on the command line.

=item C<resources>

Controls generation of the F<resources> file. Currently only C<github>
is supported. Equivalent to passing C<--resources github> on the
command line.

=item C<syntax-checking>

Set to C<on> to enable Perl syntax checking during the build via
C<perl -wc> in the C<%.pm> and C<%.pl> pattern rules. See
L<CPAN::Maker::Bootstrapper/EXTENDING THE BUILD SYSTEM> for details.

=item C<perltidyrc>

Path to a F<.perltidyrc> configuration file. When set, enables
C<perltidy> checking in the build system pattern rules.

=item C<perlcriticrc>

Path to a F<.perlcriticrc> configuration file. When set, enables
C<perlcritic> checking in the build system pattern rules.

=item C<llm-api-key-helper>

A shell command whose output is used as the LLM API key. Executed when
no key is passed directly and C<LLM_API_KEY> is not set in the environment.
The command should print the key and nothing else. The file it reads should
be chmod 600.

Example: cat ~/.ssh/anthropic-api-key

=back

=head1 METHODS

=head2 new

  my $reader = CPAN::Maker::ConfigReader->new;
  my $reader = CPAN::Maker::ConfigReader->new($file);

Creates a new C<ConfigReader> instance. The configuration file is
resolved in the following order:

=over 4

=item 1. The C<$file> argument if provided

=item 2. The C<CPAN_MAKER_CONFIG> environment variable

=item 3. F<~/.gitconfig>

=back

Dies if the resolved file does not exist or cannot be read.

=head2 get_value

  my $val = $reader->get_value($section, $key);

Low-level accessor for any section and key in the config file. Useful
for reading project-specific keys beyond those C<ConfigReader> knows
about.

=head2 user_name

Returns C<name> from the C<[user]> section.

=head2 user_email

Returns C<email> from the C<[user]> section.

=head2 user_github

Returns C<github> from the C<[user]> section.

=head2 cpan_maker_basedir

Returns C<basedir> from the C<[cpan-maker]> section.

=head2 cpan_llm_api_key_helper

Bash snippet or the name of an executable script that provides the LLM
API key.

=head2 max-tokens

The maxium number of tokens output tokens.



( run in 0.897 second using v1.01-cache-2.11-cpan-cdf2f3d4e48 )