Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- my $git = Import::Git->new( dryrun => $dryrun );
- around BUILDARGS => sub {
- my $orig = shift;
- my $class = shift;
- my %args = ( @_ == 1 ? %{ $_[ 0 ] } : @_ );
- if ( !%args || $args{ 'dryrun' } != 1 ) {
- return $class->$orig( @_ );
- }
- else {
- return Import::Git::dryrun->$orig( @_ );
- }
- };
- DB<1> x Import::Git->new( dryrun => 1 )
- 0 Import::Git=HASH(0x2fd9210)
- 'dryrun' => 1
- DB<2> x Import::Git->new()
- 0 Import::Git=HASH(0x301dbb8)
- 'dryrun' => 0
- DB<3>
- # change this:
- return Import::Git::dryrun->$orig( @_ );
- # to this
- return Import::Git::dryrun->new( @_ );
Add Comment
Please, Sign In to add comment