Pull requests

#17 Declined
Repository
timbrody timbrody
Branch
default
Repository
shlomif shlomif
Branch
default

Fixed NodeList::item() calling a 1-indexed array reference (should be 0-indexed according to DOM spec.)

Author
  1. Tim Brody avatarTim Brody
Reviewers
Description

Seems to be a long-standing bug that I've never noticed before.

See also http://www.w3.org/TR/DOM-Level-3-Core/core.html#ID-536297177.

Comments (1)

  1. Shlomi Fish repo owner

    Hi Tim,

    this would be a welcome bug fix. However, the patch suffers from the following issues:

    1. No explicit return on the "item()" method. See: http://perl-begin.org/tutorials/bad-elements/#explicit_return .

    2. You're using a mixture of CORE::shift and «my ($pos) = _;». It should just be «my ($self, $pos) = _;».

    3. You need to add some tests in t/*.t.

    For more information, see:

    http://www.shlomifish.org/open-source/resources/how-to-contribute-to-my-projects/

    Regards,

    -- Shlomi Fish

Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.