git-pureperl icon indicating copy to clipboard operation
git-pureperl copied to clipboard

defined(@array) is deprecated

Open c9s opened this issue 13 years ago • 2 comments

Code:

use Git::PurePerl;
my $git = Git::PurePerl->new(
    directory => '.git'
);
$git->master->committer;
$git->master->comment;
$obj = $git->get_object($git->master->tree);
use Data::Dumper; warn Dumper( $obj );
defined(@array) is deprecated at /Users/c9s/perl5/perlbrew/perls/perl-5.15.7/lib/site_perl/5.15.7/PerlIO/via/dynamic.pm line 149.
    (Maybe you should just omit the defined()?)
.git/.git is not a directory at /Users/c9s/perl5/perlbrew/perls/perl-5.15.7/lib/site_perl/5.15.7/Git/PurePerl.pm line 105
    Git::PurePerl::BUILD('Git::PurePerl=HASH(0x7fdbc4959818)', 'HASH(0x7fdbc302a6a8)') called at constructor Git::PurePerl::new (defined at /Users/c9s/perl5/perlbrew/perls/perl-5.15.7/lib/site_perl/5.15.7/Git/PurePerl.pm line 92) line 63
    Git::PurePerl::new('Git::PurePerl', 'directory', '.git') called at git.pl line 4

c9s avatar Apr 23 '12 03:04 c9s

This looks like a problem in PerlIO::via::dynamic module, and it is indeed filed there: https://rt.cpan.org/Public/Bug/Display.html?id=77495 /cc @alexmv

Also, the most relevant fork for Git::PurePerl is https://github.com/broquaint/git-pureperl. Cogit (a Moose-less fork of Git::PurePerl) is worth looking at as well.

sergeyromanov avatar Oct 25 '16 18:10 sergeyromanov

PerlIO::via::dynamic version 0.14 addressed this:

https://github.com/bestpractical/perlio-via-dynamic/commit/c673c9426688dbf66b8bd0d2f79f3b600de4337a

I've resolved the rt.cpan.org ticket.

alexmv avatar Oct 26 '16 06:10 alexmv