Dist-Zilla

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN


1.100630  2010-03-03 22:23:21 America/New_York
          the log method now uses a pluggable logger, defaulting to
            Log::Dispatchouli
          plugins now log with a useful prefix to indicate what is logging

          prerequisites are now managed by Dist::Zilla::Prereq
          complex prereqs (a la Version::Requirement) are possible

1.100600  2010-03-01 08:19:06 America/New_York
          the File role provides a mode attribute; files are chmodded on write
          the mode attribute may not be world-writeable
          files gathered by AllFiles will have their on-disk mode &= 0755

1.100520  2010-02-21 15:53:39 America/New_York
          MakeMaker plugin correctly requires the right version of perl again

1.100160  2010-01-16 15:37:29 America/New_York
          require File::Install::ShareDir if needed for Makefile.PL share

1.100130  2010-01-13 08:18:29 America/New_York

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

  my $file_path = path($file->name);

  my $to_dir = path($build_root)->child( $file_path->parent );
  my $to = $to_dir->child( $file_path->basename );
  $to_dir->mkpath unless -e $to_dir;
  die "not a directory: $to_dir" unless -d $to_dir;

  Carp::croak("attempted to write $to multiple times") if -e $to;

  path("$to")->spew_raw( $file->encoded_content );
  chmod $file->mode, "$to" or die "couldn't chmod $to: $!";
}

#pod =attr logger
#pod
#pod This attribute stores a L<Log::Dispatchouli::Proxy> object, used to log
#pod messages.  By default, a proxy to the dist's L<Chrome|Dist::Zilla::Role::Chrome> is
#pod taken.
#pod
#pod The following methods are delegated from the Dist::Zilla object to the logger:
#pod

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

    my @frame = caller($level);
    last if not defined $frame[0];
    return $1 if $frame[0] =~ m/^Dist::Zilla::Plugin::(.+)$/;
  }
  return 'unknown';
}

#pod =attr mode
#pod
#pod This is the mode with which the file should be written out.  It's an integer
#pod with the usual C<chmod> semantics.  It defaults to 0644.
#pod
#pod =cut

my $safe_file_mode = subtype(
  as 'Int',
  where   { not( $_ & 0002) },
  message { "file mode would be world-writeable" }
);

has mode => (

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


This is a list of strings describing when and why the file was added
to the distribution and when it was updated (its content, filename, or other attributes).  It will
generally be updated by a plugin implementing the
L<FileMunger|Dist::Zilla::Role::FileMunger> role.  Its accessor will return
the list of strings, concatenated with C<'; '>.

=head2 mode

This is the mode with which the file should be written out.  It's an integer
with the usual C<chmod> semantics.  It defaults to 0644.

=head1 METHODS

=head2 is_bytes

Returns true if the C<encoding> is bytes.  When true, accessing
C<content> will be an error.

=head1 AUTHOR



( run in 0.425 second using v1.01-cache-2.11-cpan-8d75d55dd25 )