CPAN

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

        Calls Cwd::fastcwd

    getdcwd
        Calls Cwd::getdcwd

    backtickcwd
        Calls the external command cwd.

  Note on the format of the urllist parameter
    urllist parameters are URLs according to RFC 1738. We do a little
    guessing if your URL is not compliant, but if you have problems with
    "file" URLs, please try the correct format. Either:

        file://localhost/whatever/ftp/pub/CPAN/

    or

        file:///home/ftp/pub/CPAN/

  The urllist parameter has CD-ROM support
    The "urllist" parameter of the configuration table contains a list of

Todo  view on Meta::CPAN

@30910/bin/perl: not ok
@31500/bin/perl: ok
@32032/bin/perl: ok
@32174/bin/perl: ok
@32186/bin/perl: ok
@32194/bin/perl: ok
@32195/bin/perl: ok

	but probably not good enough to run the whole code in t/thread.t.

	I would guess that somewhere between 27048 and 29353 the compatibility
	layer broke heavily and somewhere between 30910 and 31500 they
	fixed it a bit. 30955 was the last change to Thread.pm. The fix for our
	minimal testcase came a bit before that:

----Program----
require Thread;
print eval{Thread->new(sub { })} ? "ok\n" : "not ok\n";

----Output of .../pCY4xFO/perl-5.8.0@30952/bin/perl----
not ok

Todo  view on Meta::CPAN

	self-configuration that something on my system was not sufficient. No
	helpful diagnostics were ever provided.

	Running through the debugger today reveals that it is due to pkg-config.

	Asking pkg-config with the right options reveals a few things

	# pkg-config --exists --print-errors 'gtk+-2.0'

	I had to call it several times and to install libxmu-dev libxinerama-dev
	libxinerama1 (who would have guessed?)

	This does at least let the above command return true.

	But there is still a version requirement in the Gtk2 package that says

	gtk+-2.0 >= 2.0.0

	And surprise, we now fulfill it.

	I think the only bug is the --silence-errors option that I saw in the

Todo  view on Meta::CPAN

	So I'll compare autobundle of 599 and 600.

	I see that Email::Simple was updated from 1.999 to 2.001.

	When I install 1.999 on 31613? Then Email-MIME-1.859 passes all tests.

	http://rt.cpan.org/Ticket/Display.html?id=28170 (reported by pmei
	<petermei@gmail.com>)
	
	* Idea: new options how to treat Module::Install. I could peek into the
	Makefile.PL and guess if it is a Module::Install based one or maybe look
	at inc/Module/Install.pm. Then what?

	Answer Auto-Install questions with "y", "n", DEFAULT? Make a difference
	between optional and mandatory? Realize that "n" would not work because
	for mandatory stuff they then ask. "Really...". Hrmmm. Ask Adam?

	I suppose he would recommend to set the PERL_MM_USE_DEFAULT variable.
	That would choose DEFAULT.

	* Todo: complete the show_xxx_version config parameters DONE

Todo  view on Meta::CPAN

../ext/Encode/t/at-tw.t                    255 65280    17   34  1-17
../ext/Encode/t/enc_data.t                   2   512    ??   ??  ??
../ext/Encode/t/enc_eucjp.t                  2   512    ??   ??  ??
../ext/Encode/t/enc_module.t                 2   512    ??   ??  ??
../ext/Encode/t/enc_utf8.t                   2   512    ??   ??  ??
../ext/Encode/t/encoding.t                   2   512    ??   ??  ??
../ext/Encode/t/fallback.t                 255 65280    44   88  1-44
../ext/Encode/t/from_to.t                  255 65280     3    6  1-3
../ext/Encode/t/grow.t                       2   512    ??   ??  ??
../ext/Encode/t/gsm0338.t                  255 65280    21   42  1-21
../ext/Encode/t/guess.t                      2   512    ??   ??  ??
../ext/Encode/t/jperl.t                    255 65280    15   30  1-15
../ext/Encode/t/mime-header.t              255 65280    11   21  1-11
../ext/Encode/t/mime_header_iso2022jp.t    255 65280    14   28  1-14
../ext/Encode/t/perlio.t                   255 65280    38   76  1-38
../ext/Encode/t/utf8strict.t                 2   512    ??   ??  ??
../ext/Hash/Util/FieldHash/t/01_load.t     255 65280     8   12  1-2 4-8
../ext/Hash/Util/FieldHash/t/02_function.  255 65280    ??   ??  ??
../ext/Hash/Util/FieldHash/t/03_class.t    255 65280     7   14  1-7
../ext/Hash/Util/FieldHash/t/04_thread.t   255 65280    ??   ??  ??
../ext/Hash/Util/FieldHash/t/05_perlhook.  255 65280    ??   ??  ??

Todo  view on Meta::CPAN

	* document how test repete is supposed to work and find tests that
	enforce that

2006-12-26  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>

	* Paul Johnson has already fixed #24067 in his repository. Unfortunately
	he sends me a link to svnweb instead of the repository itself. Svnweb
	itself neither gives machine readable output nor does it provide a link
	to the repository.

	Fortunately one can guess it: svn ls http://pjcj.sytes.net/svn/Devel-Cover

	Repository version passes all tests.

2006-12-25  Andreas J. Koenig  <andreas.koenig.7os6VVqR@franz.ak.mind.de>

	* I don't know how to prevent SQLite dieing due to locked database.
	Because it happens such that a batch process reads the database and an
	interactive process tries to write the database. The latter does not
	know about the other. Both know nothing about each other beforehand.
	Then they clash and I cannot find out.

Todo  view on Meta::CPAN

	it's presently using $CPAN::Config->{cpan_home},
	which I believe is the same location as Metadata;
	- the name of the database file; in this I've been
	using a new config entry $CPAN::Config->{sqlite_dbname},
	or 'cpandb-sqlite', as a default;
	- the location (directory) beneath which the CPAN
	indices are kept; I've been using
	$CPAN::Config->{keep_source_where}, assuming
	it's a simple directory.
	
	The guessing for this in CPAN::SQLite comes when it's
	not being run under CPAN.pm.
	
	As for CPAN::SQLite providing data to CPAN.pm,
	that's being done solely in CPAN::SQLite::META,
	and it uses
	  $CPAN::META->instance($class => $id)->set(%data);
	for everything, except for CONTAINSMODS, where
	it uses
	  $d = $CPAN::META->instance($class => $id);
	  $d->{CONTAINSMODS} = \%list_of_mods;

Todo  view on Meta::CPAN

	* "I hate Module::AutoInstall". See down under the hr when you ever have
	time.

2006-11-12  Andreas J. Koenig  <andreas.koenig.gmwojprw@franz.ak.mind.de>

	* BUG: randomize_urllist cannot be set on the shell commandline: because
	it ends in "list", it becomes always an array:))

	FIXED

	* Todo: guess the patch option -p0 or -p1

	DONE

	* distroprefs with artificial intelligence: find out how to write a
	distropref with so much AI that it handles several different dialogues.
	I just realized that YAML::Syck talked me into a different dialogue on
	some older bleadperl that had YAML 0.60 installed:

*** WARNING ***

Todo  view on Meta::CPAN

	wrong.

	Trying to set use_sqlite earlier with a tiny patch to Makefile.PL.
	Doesn't work because CPAN::SQLite loads MyConfig again according to the
	debugger:

	$ = require '/home/k/.cpan/CPAN/MyConfig.pm' called from file `/home/src/perl/repoperls/installed-perls/perl/peHlG5S/perl-5.8.0@29243/lib/site_perl/5.9.5/CPAN/SQLite.pm' line 50

	So we lose the switch again. Back to the drawing board.

	Either I need a way to use CPAN::SQLite without having it guess CPAN.pm
	internals all over the place. Or Randy needs a CPAN.pm that has API
	calls for all the CPAN.pm internals. I cannot allow a plugin that tries
	to reload the Config file and overwriting the Internals that I have
	currently set. This is happening and makes it hard to predict what will
	happen next.

	FIXED by Randy

	* Bug: When I tried to report MSCHWERN/B-Generate-1.06_2.tar.gz, it
	failed but did not try all 43 hosts.

Todo  view on Meta::CPAN


	FIXED in rev. 1132 but what is a good test for it? test WRITTEN in 1133.

2006-10-23  Andreas J. Koenig  <andreas.koenig.gmwojprw@franz.ak.mind.de>

	* The ->VERSION bug was back for a short while. It happens when
	version.pm is not installed and Module::Build loads its own version.pm
	from <data>. There it finds 0.661 and this does something that isn't
	fool proof, very hard to diagnose and to reproduce. Easy workaround: do
	not check for Module::Signature->VERSION anymore. The test was on 0.26
	and we now have 0.55, so I guess, I can remove the version test.

	As soon as I have means to not call into Module::Build, this bug will
	diappear for sure, so no need to hunt it down from here. FINISHED in
	rev. 1123

	So recall: one can turn off sig_check, then install version, then leave
	and enter CPAN.pm and the bug should disappear. Or we release 1.88_57
	now. Update: I released 1.88_57 immediately after that.

	* SMPETERS fixed DBI-1.52. Thank you! YAML for DBI with patch address

Todo  view on Meta::CPAN

not ok 5 # content_length=0


HERE [html] at ../blib/lib/LWP/MediaTypes.pm line 70.
size[0]mtime[1160191755] at ../blib/lib/HTTP/Daemon.pm line 531.

	Daemon.pm:
	sysopen(F, $file, 0) or 
	  return $self->send_error(RC_FORBIDDEN);
	binmode(F);
	my($ct,$ce) = guess_media_type($file);
	my($size,$mtime) = (stat _)[7,9];

	Tracked and reported to P5P. FINI.
	
	* Todo: Write a new test: If one prerequisite doesn't pass its tests, we
	sure want to test the dependent module but it must not be installed. I
	have no example at hand.

	First continue fixing dummy-Build and dummy-Make distros (and maybe
	more), then make one that is depending on dummy-Fails. DONE in rev. 973

Todo  view on Meta::CPAN

	* hr ================ no todos below this line ================ /hr

	* How do I merge the branch 1.87-install-scripts into current code base?

	The problem is, I do not remember where the branch started. Is this a
	problem? I have the branches already checked out in ../SVN-branches/.

	There I find the train hackathon result was in 689 and 686 was the copy
	that started the branch.

	So I guess the merge command would have to be

	svn merge -r 686:689 https://pause.perl.org:5460/svn/cpanpm/branches/1.87-install-scripts

	YES, this did it and is now to be checked in as rev. 733

	'install ANDK/keepcool-0.344' works now like a charm, the stored script
	name is even 'keepcool' and not 'keepcool-0.344'.

2006-07-19  Andreas J. Koenig  <andreas.koenig.gmwojprw@franz.ak.mind.de>

lib/App/Cpan.pm  view on Meta::CPAN

	l =>  [ \&_list_all_mods,     NO_ARGS, GOOD_EXIT, 'Listing all modules'          ],

	L =>  [ \&_show_author_mods,     ARGS, GOOD_EXIT, 'Showing author mods'          ],
	a =>  [ \&_create_autobundle, NO_ARGS, GOOD_EXIT, 'Creating autobundle'          ],
	p =>  [ \&_ping_mirrors,      NO_ARGS, GOOD_EXIT, 'Pinging mirrors'              ],

	r =>  [ \&_recompile,         NO_ARGS, GOOD_EXIT, 'Recompiling'                  ],
	u =>  [ \&_upgrade,           NO_ARGS, GOOD_EXIT, 'Running `make test`'          ],
	's' => [ \&_shell,            NO_ARGS, GOOD_EXIT, 'Drop into the CPAN.pm shell'  ],

	'x' => [ \&_guess_namespace,     ARGS, GOOD_EXIT, 'Guessing namespaces'          ],
	c =>  [ \&_default,              ARGS, GOOD_EXIT, 'Running `make clean`'         ],
	f =>  [ \&_default,              ARGS, GOOD_EXIT, 'Installing with force'        ],
	i =>  [ \&_default,              ARGS, GOOD_EXIT, 'Running `make install`'       ],
	'm' => [ \&_default,             ARGS, GOOD_EXIT, 'Running `make`'               ],
	t =>  [ \&_default,              ARGS, GOOD_EXIT, 'Running `make test`'          ],
	T =>  [ \&_default,              ARGS, GOOD_EXIT, 'Installing with notest'       ],
	);

%Method_table_index = (
	code        => 0,

lib/App/Cpan.pm  view on Meta::CPAN

	# call the CPAN::Shell method, with force or notest if specified
	my $action = do {
		   if( $options->{f} ) { sub { CPAN::Shell->force( $method, @_ )  } }
		elsif( $options->{T} ) { sub { CPAN::Shell->notest( $method, @_ ) } }
		else                   { sub { CPAN::Shell->$method( @_ )         } }
		};

	# How do I handle exit codes for multiple arguments?
	my @errors = ();

	$options->{x} or _disable_guessers();

	foreach my $arg ( @$args )
		{
		# check the argument and perhaps capture typos
		my $module = _expand_module( $arg ) or do {
			$logger->error( "Skipping $arg because I couldn't find a matching namespace." );
			next;
			};

		_clear_cpanpm_output();

lib/App/Cpan.pm  view on Meta::CPAN

	return $expanded if $expanded;
	$expanded = CPAN::Shell->expand( "Module", $module );
	unless( defined $expanded ) {
		$logger->error( "Could not expand [$module]. Check the module name." );
		my $threshold = (
			grep { int }
			sort { length $a <=> length $b }
				length($module)/4, 4
			)[0];

		my $guesses = _guess_at_module_name( $module, $threshold );
		if( defined $guesses and @$guesses ) {
			$logger->info( "Perhaps you meant one of these:" );
			foreach my $guess ( @$guesses ) {
				$logger->info( "\t$guess" );
				}
			}
		return;
		}

	return $expanded;
	}

my $guessers = [
	[ qw( Text::Levenshtein::XS distance 7 1 ) ],
	[ qw( Text::Levenshtein::Damerau::XS     xs_edistance 7 1 ) ],

	[ qw( Text::Levenshtein     distance 7 1 ) ],
	[ qw( Text::Levenshtein::Damerau::PP     pp_edistance 7 1 ) ],

	];

sub _disable_guessers
	{
	$_->[-1] = 0 for @$guessers;
	}

# for -x
sub _guess_namespace
	{
	my $args = shift;

	foreach my $arg ( @$args )
		{
		$logger->debug( "Checking $arg" );
		my $guesses = _guess_at_module_name( $arg );

		foreach my $guess ( @$guesses ) {
			print $guess, "\n";
			}
		}

	return HEY_IT_WORKED;
	}

sub _list_all_namespaces {
	my $modules = _get_all_namespaces();

	foreach my $module ( @$modules ) {
		print $module, "\n";
		}
	}

BEGIN {
my $distance;
my $_threshold;
my $can_guess;
my $shown_help = 0;
sub _guess_at_module_name
	{
	my( $target, $threshold ) = @_;

	unless( defined $distance ) {
		foreach my $try ( @$guessers ) {
			$can_guess = eval "require $try->[0]; 1" or next;

			$try->[-1] or next; # disabled
			no strict 'refs';
			$distance = \&{ join "::", @$try[0,1] };
			$threshold ||= $try->[2];
			}
		}
	$_threshold ||= $threshold;

	unless( $distance ) {
		unless( $shown_help ) {
			my $modules = join ", ", map { $_->[0] } @$guessers;
			substr $modules, rindex( $modules, ',' ), 1, ', and';

			# Should this be colorized?
			if( $can_guess ) {
				$logger->info( "I can suggest names if you provide the -x option on invocation." );
				}
			else {
				$logger->info( "I can suggest names if you install one of $modules" );
				$logger->info( "and you provide the -x option on invocation." );
				}
			$shown_help++;
			}
		return;
		}

	my $modules = _get_all_namespaces();
	$logger->info( "Checking " . @$modules . " namespaces for close match suggestions" );

	my %guesses;
	foreach my $guess ( @$modules ) {
		my $distance = $distance->( $target, $guess );
		next if $distance > $_threshold;
		$guesses{$guess} = $distance;
		}

	my @guesses = sort { $guesses{$a} <=> $guesses{$b} } keys %guesses;
	return [ grep { defined } @guesses[0..9] ];
	}
}

1;

=back

=head1 EXIT VALUES

The script exits with zero if it thinks that everything worked, or a

lib/CPAN.pm  view on Meta::CPAN


=item backtickcwd

Calls the external command cwd.

=back

=head2 Note on the format of the urllist parameter

urllist parameters are URLs according to RFC 1738. We do a little
guessing if your URL is not compliant, but if you have problems with
C<file> URLs, please try the correct format. Either:

    file://localhost/whatever/ftp/pub/CPAN/

or

    file:///home/ftp/pub/CPAN/

=head2 The urllist parameter has CD-ROM support

lib/CPAN/Author.pm  view on Meta::CPAN

            };
            if ($lc_file) {
                $lc_file =~ s{\.gz(?!\n)\Z}{}; #};
                eval{CPAN::Tarzip->new("$lc_file.gz")->gunzip($lc_file)};
            } else {
                return;
            }
        }
    } else {
        $lc_file = $lc_want;
        # we *could* second-guess and if the user has a file: URL,
        # then we could look there. But on the other hand, if they do
        # have a file: URL, why did they choose to set
        # $CPAN::Config->{show_upload_date} to false?
    }

    # adapted from CPAN::Distribution::CHECKSUM_check_file ;
    $fh = FileHandle->new;
    my($cksum);
    if (open $fh, $lc_file) {
        local($/);

lib/CPAN/FirstTime.pm  view on Meta::CPAN


cpan_home_where => qq{

First of all, I'd like to create this directory. Where?

},

external_progs => qq{

The CPAN module will need a few external programs to work properly.
Please correct me, if I guess the wrong path for a program. Don't
panic if you do not have some of them, just press ENTER for those. To
disable the use of a program, you can type a space followed by ENTER.

},

proxy_intro => qq{

If you're accessing the net via proxies, you can specify them in the
CPAN configuration or via environment variables. The variable in
the \$CPAN::Config takes precedence.

lib/CPAN/HandleConfig.pm  view on Meta::CPAN


if it contains whitespace, then

if it contains quotes: better leave it as it is

else: quote it with the correct quote type for the box we're on

=cut

{
    # Instead of patching the guess, set commands_quote
    # to the right value
    my ($quotes,$use_quote)
        = $^O eq 'MSWin32'
            ? ('"', '"')
                : (q{"'}, "'")
                    ;

    sub safe_quote {
        my ($self, $command) = @_;
        # Set up quote/default quote

lib/CPAN/Plugin/Specfile.pm  view on Meta::CPAN

    my $build_dir = $d->{build_dir} or $CPAN::Frontend->mydie("Distribution has not been built yet, cannot proceed");
    my %contains = map {($_ => undef)} $d->containsmods;
    my @m;
    my $width = 16;
    my $header = sub {
        my($header,$value) = @_;
        push @m, sprintf("%-s:%*s%s\n", $header, $width-length($header), "", $value);
    };
    my $dni = CPAN::DistnameInfo->new($distribution);
    my $dist = $dni->dist;
    my $summary = CPAN::Shell->_guess_manpage($d,\%contains,$dist);
    $header->("Name", "perl-$dist");
    my $version = $dni->version;
    $header->("Version", $version);
    $header->("Release", "1%{?dist}");
#Summary:        Template processing system
#Group:          Development/Libraries
#License:        GPL+ or Artistic
#URL:            http://www.template-toolkit.org/
#Source0:        http://search.cpan.org/CPAN/authors/id/A/AB/ABW/Template-Toolkit-%{version}.tar.gz
#Patch0:         Template-2.22-SREZIC-01.patch

lib/CPAN/Shell.pm  view on Meta::CPAN

            $highest = List::Util::reduce {
                Sort::Versions::versioncmp($a,$b) > 0 ? $a : $b
              } @{$stems{$_}};
        } else {
            $highest = $stems{$_}[0];
        }
        $CPAN::Frontend->myprint("$highest\n");
    }
}

sub _guess_manpage {
    my($self,$d,$contains,$dist) = @_;
    $dist =~ s/-/::/g;
    my $module;
    if (exists $contains->{$dist}) {
        $module = $dist;
    } elsif (1 == keys %$contains) {
        ($module) = keys %$contains;
    }
    my $manpage;
    if ($module) {

t/30shell.coverage  view on Meta::CPAN

 blib/lib/CPAN/Nox.pm                 100.0   50.0    n/a  100.0    0.0   95.0
 blib/lib/CPAN/Tarzip.pm               40.3   20.8   22.2   78.6    0.4   34.8
 blib/lib/CPAN/Version.pm              83.3   54.5   84.0  100.0    0.0   78.6
 Total                                 53.3   36.8   33.0   75.5  100.0   47.2
 ----------------------------------- ------ ------ ------ ------ ------ ------


2006-02-24: Notes about 5.004_05: t30shell.t segfaults when trying to
parse the test.out. One would have to look through the test.out output
and find an alternate method of walking through the results tha works
for 5.004_05. But it would have to be guesswork to find out what is
triggering the SEGV.

 After 671
 ----------------------------------- ------ ------ ------ ------ ------ ------
 File                                  stmt   bran   cond    sub   time  total
 ----------------------------------- ------ ------ ------ ------ ------ ------
 blib/lib/CPAN.pm                      17.6    8.4    6.6   34.9   80.7   14.6
 blib/lib/CPAN/Admin.pm                12.9    0.0    0.0   62.5    0.1   11.8
 blib/lib/CPAN/Debug.pm                68.2   40.0    0.0  100.0    0.5   57.9
 blib/lib/CPAN/FirstTime.pm            11.2    1.0    0.0   55.2    1.2    7.8

t/30shell.coverage  view on Meta::CPAN

blib/lib/CPAN/Nox.pm                 100.0   50.0    n/a  100.0    0.0   95.0
lib/CPAN.pm                           52.3   37.3   33.0   74.0   35.0   46.9
lib/CPAN/Debug.pm                     68.2   40.0    0.0  100.0    0.0   57.9
lib/CPAN/HandleConfig.pm              51.7   38.8   17.6   80.0   61.3   43.7
lib/CPAN/Tarzip.pm                    42.0   25.4   40.0   78.6    0.2   37.8
lib/CPAN/Version.pm                   83.3   54.5   84.0  100.0    0.0   78.6
Total                                 52.4   38.2   38.3   76.0  100.0   47.6
----------------------------------- ------ ------ ------ ------ ------ ------

So I should consult the Cover docs, sigh! And maybe compare details?
I'd *guess* that it has to do with lib and blib and the fact that 37
is exactly the half of 74 seems to indicate a cut in half in the wrong
place. For now I'm happy with 0.58






	Local Variables:
	mode: change-log



( run in 1.198 second using v1.01-cache-2.11-cpan-748bfb374f4 )