Skip to content

Commit

Permalink
fix bug: I should have checked for definedness rather than for simple…
Browse files Browse the repository at this point in the history
… true/false

When the first element is the element to be replaced, the index is 0. That
would be 'false', hence the element wasn't replaced.
  • Loading branch information
reneeb authored and oalders committed Jul 13, 2022
1 parent 31935bb commit 5946c86
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions t/ppi_element_replace.t
Expand Up @@ -3,11 +3,10 @@
# Unit testing for PPI::Element

use lib 't/lib';
use PPI::Document ();
use PPI::Test::pragmas;
use Test::More;

use PPI;

__REPLACE: {
my $Document = PPI::Document->new( \"print 'Hello World';" );
isa_ok( $Document, 'PPI::Document' );
Expand Down

0 comments on commit 5946c86

Please sign in to comment.