Dist-Zilla

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Dist-Zilla

6.033     2025-05-01 11:45:18-04:00 America/New_York
        - when creating a tarball with GNU tar, use --format=ustar to avoid
          xattrs and other problems sometimes related to macOS (thanks, Graham
          Knop!)

6.032     2024-05-25 12:30:02-04:00 America/New_York
        - UploadToCPAN errors will distinguish between "couldn't find password"
          and "something went wrong trying to get password"
        - UploadToCPAN can now use any Login-type stash for credentials, not
          just a PAUSE-class stash

6.031     2023-11-20 19:49:23-05:00 America/New_York
        - avoid some warnings on platforms without symlinks; (thanks, reneeb!)

6.030     2023-01-18 21:36:40-05:00 America/New_York
        - "dzil new" will use command line options before configuration
        - "dzil add" now falls back to %Mint stash options before defaults
          (for both of the above: thanks, Graham Knop!)

Changes  view on Meta::CPAN

        - [AutoPrereqs] now looks for develop prerequisites in xt/ (thanks,
          Karen Etheridge)
        - new file finder ':PerlExecFiles' (thanks, Karen Etheridge)
        - try harder to notice failure to set up build root, especially on
          Win32 (thanks, Christian Walde)
        - better errors when a global config package isn't available (thanks,
          Karen Etheridge)
        - added the "ignore" option to [Encoding] (thanks, Yanick Champoux)
        - allow ; authordep specifications to contain version ranges (thanks,
          Karen Etheridge)
        - better error when PAUSE credentials can't be loaded (thanks, David
          Golden)
        - fix documentation for the LicenseProvider role
        - improve errors when PPI failes to parse (thanks, Nick Tonkin)
        - sort list of executable files in Makefile.PL, for deterministic
          builds (thanks, Karen Etheridge)
        - omit configure-requires prerequisites from [MakeMaker]'s fallback
          prerequisites (used by older ExtUtils::MakeMaker)

5.037     2015-06-04 21:46:38-04:00 America/New_York
        - issue a warning when version ranges are passed through to

Changes  view on Meta::CPAN

        - attempt to return abstract-from-file as a string, rather than
          bytes, which can lead to weirdness (github issue #303)

5.017     2014-05-17 08:35:33-04:00 America/New_York
        - dotfiles and dot-directories are now included in sharedirs
        - ModuleBuild and MakeMake should not re-build if it isn't needed
        - authordeps now better understands "perl" dep
        - munging of README is delayed to prevent unneeded work and
          complication
        - MANIFEST is now treated as a binary file
        - 'dzil setup' now warns that credentials are stored in the clear
        - MakeMaker should include fewer empty and useless hashrefs
        - Makefile.old is now pruned as cruft

5.016     2014-05-05 22:27:06-04:00 America/New_York
        - hint about [Encoding] plugin in encoding error message (David
          Golden)

5.015     2014-03-30 21:55:36-04:00 America/New_York
        - make it easier to have multiple PAUSE configs using UploadToCPAN's
          pause_cfg_dir option (thanks, David Golden)

Changes  view on Meta::CPAN


        - Many slow-to-load modules are now loaded opportunistically to improve
          startup time.  (Thanks Olivier Mengué and rjbs)

        - ShareDir documentation has been improved (thanks, Karen
          Etheridge)

        - Prereqs documentation has been improved

4.300003  2011-10-31 23:58:19 America/New_York
        - If no credentials are found on disk, UploadToCPAN will now prompt for
          credentials during the BeforeRelease phase, not during release
          (Thanks, Christopher J. Madsen!)

        - AutoPrereqs can now be told what scanners or extra_scanners args to
          pass to Perl::PrereqScanner (Thanks, Christopher J. Madsen!)

        - Prune perl prereqs out of BUILD_REQUIRES for EU::MM, and pick the
          highest required perl of either runtime or built requires.  (Thanks,
          Christopher J. Madsen!)

        - Test routines should now properly report the calling line for

Changes  view on Meta::CPAN

        - We now use Archive::Tar::Wrapper if available, to speed up archive
          building.  (Thanks, Dave Rolsky!)

4.300000  2011-08-19 10:12:36 America/New_York
        - turn on Useqq option for Dumper, to get unicode string literals set
          properly in Makefile.PL and Build.PL without using utf8.pm

        - decode user input from Chrome::Term as UTF-8

        - during `dzil setup`, the config.ini file is now created with an added
          umask of 077 to avoid other users reading your PAUSE credentials

        - update almost all Moose code to use make_immutable and
          namespace::autoclean

4.200018  2011-08-18 11:13:03 America/New_York
        - correct Perl::PrereqScanner version requirement, which was too low

4.200017  2011-08-17 18:54:07 America/New_York
        - require and adapt to the new Perl::PrereqScanner, which does not
          prune out prereqs just because they're core and common

Changes  view on Meta::CPAN


4.200009  2011-07-06 23:26:09 America/New_York
          the "skip" argument to AutoPrereqs can now be given multiple times

          authordeps now makes a rough attempt to deal with [@Filter]

          catch and simplify "no dist.ini" errors from MVP

          UploadToCPAN now takes a "upload_uri" option

          UploadToCPAN will now prompt for credentials if needed

          add follow_symlinks to GatherDir (thanks, Luc St-Louis)

4.200008  2011-06-23 11:53:56 America/New_York
          PodVersion no longer drops the file's last newline

          listdeps now includes recommended prereqs as well as required

4.200007  2011-06-01 21:52:00 America/New_York

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

  our @ISA = 'CPAN::Uploader';
  # Report CPAN::Uploader's version, not ours:
  sub _ua_string { CPAN::Uploader->_ua_string }

  sub log {
    my $self = shift;
    $self->{'Dist::Zilla'}{plugin}->log(@_);
  }
}

#pod =attr credentials_stash
#pod
#pod This attribute holds the name of a L<PAUSE stash|Dist::Zilla::Stash::Login>
#pod that will contain the credentials to be used for the upload.  By default,
#pod UploadToCPAN will look for a C<%PAUSE> stash.
#pod
#pod =cut

has credentials_stash => (
  is  => 'ro',
  isa => 'Str',
  default => '%PAUSE'
);

has _credentials_stash_obj => (
  is   => 'ro',
  isa  => maybe_type( role_type('Dist::Zilla::Role::Stash::Login') ),
  lazy => 1,
  init_arg => undef,
  default  => sub { $_[0]->zilla->stash_named( $_[0]->credentials_stash ) },
);

sub _credential {
  my ($self, $name) = @_;

  return unless my $stash = $self->_credentials_stash_obj;
  return $stash->$name;
}

sub mvp_aliases {
  return { user => 'username' };
}

#pod =attr username
#pod
#pod This option supplies the user's PAUSE username.

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

        { noecho => 1 },
      );
    }

    return $pw;
  },
);

#pod =attr pause_cfg_file
#pod
#pod This is the name of the file containing your pause credentials.  It defaults
#pod F<.pause>.  If you give a relative path, it is taken to be relative to
#pod L</pause_cfg_dir>.
#pod
#pod =cut

has pause_cfg_file => (
  is      => 'ro',
  isa     => 'Str',
  lazy    => 1,
  default => sub { '.pause' },

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

  default => sub {
    my $self = shift;
    require CPAN::Uploader;
    my $file = $self->pause_cfg_file;
    $file = File::Spec->catfile($self->pause_cfg_dir, $file)
      unless File::Spec->file_name_is_absolute($file);
    return {} unless -e $file && -r _;
    my $cfg = try {
      CPAN::Uploader->read_config_file($file)
    } catch {
      $self->log("Couldn't load credentials from '$file': $_");
      {};
    };
    return $cfg;
  },
);

#pod =attr subdir
#pod
#pod If given, this specifies a subdirectory under the user's home directory to
#pod which to upload.  Using this option is not recommended.

lib/Dist/Zilla/Plugin/UploadToCPAN.pm  view on Meta::CPAN

released version is v5.40, then this module should work on both v5.40 and
v5.38.)

Although it may work on older versions of perl, no guarantee is made that the
minimum required version will not be increased.  The version may be increased
for any reason, and there is no promise that patches will be accepted to
lower the minimum required perl.

=head1 ATTRIBUTES

=head2 credentials_stash

This attribute holds the name of a L<PAUSE stash|Dist::Zilla::Stash::Login>
that will contain the credentials to be used for the upload.  By default,
UploadToCPAN will look for a C<%PAUSE> stash.

=head2 username

This option supplies the user's PAUSE username.
It will be looked for in the user's PAUSE configuration; if not
found, the user will be prompted.

=head2 password

This option supplies the user's PAUSE password.  It cannot be provided via
F<dist.ini>.  It will be looked for in the user's PAUSE configuration; if not
found, the user will be prompted.

=head2 pause_cfg_file

This is the name of the file containing your pause credentials.  It defaults
F<.pause>.  If you give a relative path, it is taken to be relative to
L</pause_cfg_dir>.

=head2 pause_cfg_dir

This is the directory for resolving a relative L</pause_cfg_file>.
it defaults to the glob expansion of F<~>.

=head2 pause_cfg

lib/Dist/Zilla/Role/Stash/Login.pm  view on Meta::CPAN

package Dist::Zilla::Role::Stash::Login 6.033;
# ABSTRACT: a stash with username/password credentials

use Moose::Role;
with 'Dist::Zilla::Role::Stash';

use Dist::Zilla::Pragmas;

use namespace::autoclean;

#pod =head1 OVERVIEW
#pod

lib/Dist/Zilla/Role/Stash/Login.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Dist::Zilla::Role::Stash::Login - a stash with username/password credentials

=head1 VERSION

version 6.033

=head1 OVERVIEW

A Login stash must provide a C<username> and C<password> method.

=head1 PERL VERSION

lib/Dist/Zilla/Stash/PAUSE.pm  view on Meta::CPAN

package Dist::Zilla::Stash::PAUSE 6.033;
# ABSTRACT: a stash of your PAUSE credentials

use Moose;

use Dist::Zilla::Pragmas;

use namespace::autoclean;

#pod =head1 OVERVIEW
#pod
#pod The PAUSE stash is a L<Login|Dist::Zilla::Role::Stash::Login> stash generally

lib/Dist/Zilla/Stash/PAUSE.pm  view on Meta::CPAN

1;

__END__

=pod

=encoding UTF-8

=head1 NAME

Dist::Zilla::Stash::PAUSE - a stash of your PAUSE credentials

=head1 VERSION

version 6.033

=head1 OVERVIEW

The PAUSE stash is a L<Login|Dist::Zilla::Role::Stash::Login> stash generally
used for uploading to PAUSE.

t/plugins/uploadtocpan.t  view on Meta::CPAN

  my $tzil = build_tzil(
    'FakeRelease',
    [ UploadToCPAN => { %safety_first } ],
  );

  # Pretend user just hits Enter at the prompts:
  set_responses($tzil, '', '');

  like( exception { $tzil->release },
        qr/No username was provided/,
        "release without credentials fails");

  my $msgs = $tzil->log_messages;

  ok(grep({ /No username was provided/} @$msgs), "insist on username");
  ok(!grep({ /Uploading.*DZT-Sample/ } @$msgs), "no upload without credentials");
  ok(
    !grep({ /fake release happen/i } @$msgs),
    "no release without credentials"
  );
}

#---------------------------------------------------------------------
# No config at all, but enter username:
{
  my $tzil = build_tzil(
    'FakeRelease',
    [ UploadToCPAN => { %safety_first } ],
  );



( run in 0.264 second using v1.01-cache-2.11-cpan-4d50c553e7e )