From: Dave Rolsky Date: Tue, 9 Feb 2010 15:36:32 +0000 (-0600) Subject: smolder is now in main Moose repo X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=a3d2d01a55f34aab3120e869b267c0d8a559f9c2;p=gitmo%2Fmoose-dev-utils.git smolder is now in main Moose repo --- diff --git a/cpan-stable-modules b/cpan-stable-modules deleted file mode 100644 index b287abf..0000000 --- a/cpan-stable-modules +++ /dev/null @@ -1,97 +0,0 @@ -Moose::Autobox -MooseX::ABC -MooseX::Accessors::ReadWritePrivate -MooseX::Aliases -MooseX::App::Cmd -MooseX::Async -MooseX::Attribute::ENV -MooseX::AttributeHelpers -MooseX::AttributeInflate -MooseX::Attribute::Prototype -MooseX::Attributes::Curried -MooseX::Blessed::Reconstruct -MooseX::ClassAttribute -MooseX::Clone -MooseX::ConfigFromFile -MooseX::Constructor::AllErrors -MooseX::Contract -MooseX::Control -MooseX::CurriedHandles -MooseX::Daemonize -MooseX::Declare -MooseX::DeepAccessors -MooseX::Emulate::Class::Accessor::Fast -MooseX::FollowPBP -MooseX::Getopt -MooseX::GlobRef -MooseX::GlobRef::Object -MooseX::HasDefaults -MooseX::Has::Sugar -MooseX::InsideOut -MooseX::InstanceTracking -MooseX::Iterator -MooseX::KeyedMutex -MooseX::LazyLogDispatch -MooseX::LogDispatch -MooseX::Log::Log4perl -MooseX::MakeImmutable -MooseX::Mangle -MooseX::MetaDescription -MooseX::Meta::TypeConstraint::ForceCoercion -MooseX::MethodAttributes -MooseX::Method::Signatures -MooseX::MultiInitArg -MooseX::MultiMethods -MooseX::MutatorAttributes -MooseX::NonMoose -MooseX::Object::Pluggable -MooseX::Param -MooseX::Params::Validate -MooseX::Plaggerize -MooseX::POE -MooseX::Policy::SemiAffordanceAccessor -MooseX::Q4MLog -MooseX::Role::Cmd -MooseX::Role::Matcher -MooseX::Role::Parameterized -MooseX::Role::XMLRPC::Client -MooseX::SemiAffordanceAccessor -MooseX::SimpleConfig -MooseX::Singleton -MooseX::SingletonMethod -MooseX::Storage -MooseX::Storage::Format::XML::Simple -MooseX::StrictConstructor -MooseX::Struct -MooseX::Templated -MooseX::Timestamp -MooseX::Traits -MooseX::Types -MooseX::Types::Authen::Passphrase -MooseX::Types::Common -MooseX::Types::Data::GUID -MooseX::Types::DateTime -MooseX::Types::IO -MooseX::Types::Path::Class -MooseX::Types::Set::Object -MooseX::Types::Structured -MooseX::Types::URI -MooseX::Types::UUID -MooseX::Types::VariantTable -MooseX::WithCache -MooseX::Workers -MooseX::YAML -Fey::ORM -KiokuDB -Catalyst -Chart::Clicker -TryCatch -Bread::Board -Devel::REPL -IM::Engine -NetHack::Item -Forest -App::Nopaste -CHI -Data::Visitor -namespace::autoclean diff --git a/cpan-stable-smolder b/cpan-stable-smolder deleted file mode 100755 index 26ddd1c..0000000 --- a/cpan-stable-smolder +++ /dev/null @@ -1,147 +0,0 @@ -#!/usr/bin/env perl - -use strict; -use warnings; -use CPAN; -use Cwd; -use File::chdir; -use IPC::Run3 qw( run3 ); - - -CPAN::HandleConfig->load(); -CPAN::Shell::setup_output(); -CPAN::Index->reload(); - -local $CPAN::Config->{tar_verbosity} = 'none'; -local $CPAN::Config->{load_module_verbosity} = 'none'; - - -my $LOGFILE = ( cwd . "/cpan-stable-smolder.log" ); - -if ( -f $LOGFILE ) { - unlink $LOGFILE; -} - -open my $log, '>', $LOGFILE || die "Could not open $LOGFILE because $!"; - -my $MODULE_LIST_FILE = ( cwd . '/cpan-stable-modules' ); - -my @modules; -{ - open my $fh, $MODULE_LIST_FILE or die "Can't open $MODULE_LIST_FILE: $!"; - @modules = map { chomp; $_ } <$fh>; -} - -test_all_modules(@modules); - -close $log; - -exit; - -sub test_all_modules { - my @statuses; - my @details; - - foreach my $project (@_) { - my $dist = get_distro_from_cpan($project); - - unless ($dist) { - print {$log} "UNKNOWN : $project (not on CPAN?)\n"; - next; - } - - my ( $passed, $warned, $output ) = test_module( $dist->dir() ); - - my $status = $passed && $warned ? 'WARN' : $passed ? 'PASS' : 'FAIL'; - - my $summary = "$status: $project - " . $dist->base_id(); - print {$log} "$summary\n"; - - push @details, [ $project, $output ] - if $warned || ! $passed; - } - - if (@details) { - print {$log} "\n\n"; - - for my $detail (@details) { - print {$log} q{-} x 50; - print {$log} "\n"; - print {$log} "$detail->[0]\n\n"; - print {$log} "$detail->[1]\n\n"; - } - } -} - -sub get_distro_from_cpan { - my $project = shift; - - ( my $module = $project ) =~ s/-/::/g; - - my @mods = CPAN::Shell->expand( 'Module', $module ); - - die "Cannot resolve $project to a single module object" - if @mods > 1; - - return unless @mods; - - my $dist = $mods[0]->distribution(); - - $dist->get(); - - return $dist; -} - -sub test_module { - my $dir = shift; - - local $CWD = $dir; - - local $ENV{PERL_AUTOINSTALL} = '--defaultdeps'; - if ( -f "Build.PL" ) { - return - unless _run_commands( - [ $^X, 'Build.PL' ], - ['./Build'], - ); - } - else { - return - unless _run_commands( - [ $^X, 'Makefile.PL' ], - ['make'], - ); - } - - return _run_tests(); -} - -sub _run_commands { - for my $cmd (@_) { - my $output; - - unless ( run3 $cmd, \undef, \$output, \$output ) { - warn "Failed to run @{$cmd}\n"; - return ( 0, $output ); - } - } - - return 1; -} - -sub _run_tests { - my $output; - - if ( -f "Build.PL" ) { - run3 [ qw( ./Build test ) ], undef, \$output, \$output; - } - else { - run3 [ qw( make test ) ], undef, \$output, \$output; - } - - my $passed = $output =~ /Result: PASS/; - my $warned = $output =~ /at .+ line \d+/; - - return ( $passed, $warned, $output ); -} -