Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Fetching latest commit…

Cannot retrieve the latest commit at this time

..
Failed to load latest commit information.
ABW.Template-Toolkit.01.yml
AUDREYT.Module-Signature.01.yml
BTROTT.Convert-PEM.01.yml
BTROTT.Crypt-DSA.01.yml
BTROTT.Feed-Find.01.yml
BTROTT.URI-Fetch-0.01.yml
BTROTT.XML-Feed.01.yml
BYRNE.SOAP-Lite.01.yml
CHAMAS.Crypt-SSLeay.01.yml
DBROBINS.Net-SSH-Perl.01.yml
EESTABROO.IMAP-Admin.01.yml
FDALY.Test-Deep.01.yml
GAAS.libwww.01.yml
GBARR.Authen-SASL.01.yml
GBARR.perl-ldap.01.yml
GEOFF.Apache-Test.01.yml
ILYAZ.Math-Pari.01.yml
ILYAZ.Term-ReadLine-Perl.01.yml
INGY.Inline.01.yml
INGY.YAML.01.yml
JJORE.Carp-Clan.01.yml
Jifty.yml
KWILLIAMS.AI-Categorizer.01.yml
LOCAL.trailing_dot_distros.yml
MIYAGAWA.Plagger.yml
MIYAGAWA.Template-P-E.yml
MIYAGAWA.XML-Atom.yml
Module-Install.yml
NIKIP.Authen-PAM.01.yml
OLAF.Net-DNS.01.yml
PCIMPRICH.XML-SAX-ExpatXS.01.yml
PDF-FromHTML.yml
PETDANCE.WWW-Mechanize.01.yml
RCAPUTO.POE.01.yml
README
RGIERSIG.Expect.yml
SCHWERN.Exporter-Lite.yml
SCHWERN.UNIVERSAL-require.yml
SREZIC.Tk-Autoscroll.01.yml
Test-CTDPBF.yml
URI.File-Slurp.yml
XML-Twig.yml
ZEV.Test-Dependencies.01.yml

README

=head1 NAME

  DistroPrefs -- Preferences/Distributions/CPAN

=head1 DESCRIPTION

The files in this directory are YAML files that specify how CPAN.pm
shall treat distributions that you want or need to treat differently
from the normal mantra of

    perl Makefile.PL
    make
    make test
    make install

Some modules try to get some data from the user interactively thus
disturbing the installation of large bundles like Phalanx100 or
modules like Plagger.

CPAN.pm can use these YAML files to either pass additional arguments
to one of the four commands, set environment variables or instantiate
an Expect object that reads from the console, waits for some regular
expression and enters some answer. Additionally, the YAML files can
temporarily override the CPAN.pm configuration variables (at the time
of this writing not all of them).

Many of the files that come with the CPAN.pm distribution contain more
fields than necessary so they can easier be used as blueprints. In
practice all empty fields can be removed from the YAML files. To find
a blueprint pick one of the larger files.

=head1 EXAMPLE FILES

CPAN.pm comes with a collection of example YAML files. Note that these
are really just examples and should not be used without care because
they cannot fit everybody's purpose. After all the authors of the
packages that ask questions had a need to ask, so you should watch
their questions and adjust the examples to your environment and your
needs. You have beend warned:-)

=head1 FILENAMES

The YAML files themselves must have the .yml extension, all other
files are ignored. The containing directory can be specified in
CPAN.pm in the prefs_dir config variable. Try 'o conf init /prefs/' in
the CPAN shell.

The names of the files can be picked freely, CPAN.pm always reads all
files (in alphabetical order) and takes the key "match" as a hashref
containing one or more of the keys C<distribution>, C<modules>, or
C<perl>. The corresponding values are interpreted as regular
expressions. The C<distribution> related one will be matched against
the canonical distribution name, e.g. "AUTHOR/Foo-Bar-3.14.tar.gz".
The C<module> related one will be matched against all modules
contained in the distribution until one module matches and the C<perl>
related one will be matched against C<$^X>. If more than one
restriction of C<module>, C<distribution>, and C<perl> is specified,
the results of the separately computed match values are ANDed. If the
final result is true, then the hashref represented by the YAML file is
returned as the preference structure for the current distribution.

=head1 MAINTAINANCE

Authors are changing their packages and introduce new dialogs, change
the wording, change the order of questions, remove questions,
introduce new options, update their autoinstaller etc. So you have to
adjust your prefs from time to time. While CPAN.pm will probably
contain some newer prefs files with every release, it will never be a
reliable data source for a large amount of prefs file and more
importantly will not always match your requirements.

So if you decide to use distroprefs do not expect that you can have
them without some maintainance overhead.

=head1 TRICKS

=head2 Repetitions

Distros using older versions of Module::AutoInstall often do not
support the --defaultdeps argument. So you probably have to use

  pl:
    expect:
      - "Auto-install"
      - "y\n"

When you watch them you probably notice that they ask one question.
Don't rely on that number. Next time you install that module it may
ask 2 or more questions: because it calculates the number of questions
from what you have installed at the moment. So better be prepared for
more questions and repeat the above pattern once or twice.

Don't hesitate to report this as a bug to the module author that is
using Module::AutoInstall. They have to update the copy of
Module::AutoInstall that comes with their package. It will not be
sufficient that you update Module::AutoInstall.

=head2 Exceptions

You have a Bundle to install and notice that the Bundle has one module
that you do NOT want for some reason? Add something like

  make: 
    args:
      - nosuchtarget

and you force this target to fail quickly.

=head2 Fun (not!)

Module::AutoInstall often doesn't get it right to find out under which
circumstances it was invoked. Setting the environment variable
PERL5_CPANPLUS_IS_RUNNING to 1 or setting PERL_AUTOINSTALL to --skip
seems to help. Best to try both. I do not understand what's up there.
If you know, please fix. If you don't, maybe try what I'm doing in
MIYAGAWA.Plagger.yml.

=head1 PATCHES

My procedure when I encounter a broken package:

    look DISTRO
    cd ..
    rsync -va DISTRODIR/ DISTRODIR.orig/
    # fix the distro in DISTRODIR
    diff -urp DISTRODIR.orig DISTRODIR > DISTRODIR-ANDK-01.patch
    gzip DISTRODIR-ANDK-01.patch

I then upload the resulting patch to my CPAN directory and write a
YAML file into my prefs_dir/ directory that contains roughly

    --- 
    comment: "This patch fixes ..."
    match:
      distribution: "^DISTRO$"

    patches:
      - ANDK/DISTRODIR-ANDK-01.patch

That's all. From then I can install that distro for any perl version
on that machine.

=head1 FEEDBACK

Please report interesting improvements you apply to these files. Any
additions and corrections are welcome. Also, please be aware that
there are many areas of this system that need further attention and
are not yet working as one would expect or hope.

Please use the
http://rt.cpan.org/Dist/Display.html?Status=Active&Queue=CPAN address
to report any bugs and wished. Thank you!

Enjoy,
-- 
andreas
Something went wrong with that request. Please try again.