Git Product home page Git Product logo

symbol-approx-sub's Issues

Better Tests

The tests are very much of the time they were written (or, perhaps, of my level of knowledge at the time they were written). There's a lot of stuff like ok(&sub eq 'string') which sohld be changed to is(sub(), 'string').

Also we should get rid of the explicit plans and use done_testing().

What is "canon"?

One of the tests includes a canon => ... option when loading Symbol::Approx::Sub. Symbol::Approx::Sub doesn't have a "canon" option.

I suspect that "canon" should be renamed to "transform". But more investigation is required.

Remove svn artifacts

This module used to be stored in a subversion repository. There are still some svn artifacts in the code (e.g. $Id$).

Check all of the files and remove these.

Better module loading

Currently we have our own code for loading plugins. Let's look at Module::Load or something like that instead.

(Bonus points for considering something like Module::Pluggable as well.)

Better $@ checks

A few tests just check $@ for truth. They should probably be more explicit about what they are testing for - otherwise tests might pass because things fail for the wrong reason.

Test::Excpetion

Would be nice to use Text::Exception in the tests that throw exceptions.

Missing tests

A couple more tests will get us to 100% coverage.

  • matcher => undef
  • chooser => sub { ... } (or, alternatively, chooser => \&some_chooser_sub)

Bug in AUTOLOAD

The code in the generated AUTOLOAD has an obvious bug. Line 385 is currently

@match_ind = @subs[1 .. $#subs];

I think that should be.

@match_ind = 1 .. $#subs;

But I'd like to see a failing test before fixing it.

Improve test coverage

Missing tests:

  • Invalid matcher
  • Undef matcher
  • Coderef chooser
  • Invalid chooser
  • Default chooser

Add descriptions to tests

Currently most of the tests are just ok($something) or is($something, $something_else). It would be nice to add descriptions to the tests so a maintenance programmer has more chance of understanding what is going on.

This might be tricky. I'm not sure that I understand what all of the tests are doing currently :/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.