GithubHelp home page GithubHelp logo

beancounter's People

Contributors

eddelbuettel avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

beancounter's Issues

Uninitialized value $age in numeric gt (>)

I really hate being the bearer of bad news, but just recently been getting a rather annoying error message:

Use of uninitialized value $age in numeric gt (>) at /usr/local/share/perl/5.20.2/Finance/BeanCounter.pm line 1743.

Things are still working, but it is annoying. Line 1743 simply states:

if ($age > 5) {

The full expression is:

if ($age > 5) { warn "Ignoring $hash{$key}{symbol} ($hash{$key}{name}) " . "with old date $hash{$key}{date}\n"; #warn "Ignoring $hash{$key}{name} with old date $hash{$key}{date}\n"; #if $Config{debug}; $hash{$key}{date} = "N/A"; next; }

I am no whiz with perl, but I do believe there is a simple fix for this somewhere. Thanks for writing such a kickass program. Beers on me, if we ever meet. Cheers.

Use of uninitialized value in die at BeanCounter.pm line 144.

Since making the transition from Linux to OpenBSD I have not been successful at setting up beancounter. I know this is rock solid code, but for some reason regardless of which database I use, I get the same error.

Use of uninitialized value in die at /usr/local/libdata/perl5/site_perl/Finance/BeanCounter.pm line 144.                                                    
Died at /usr/local/libdata/perl5/site_perl/Finance/BeanCounter.pm line 144.

The section that contains line 144, is part of beancounter's database test to see if the database is configured correctly. The line of code does not look like one I can just comment out something, and go on my way. I am not sure why my system is not defining that particular variable.

The block of code in question is:

sub TestInsufficientDatabaseSchema($$) {
  my ($dbh, $required) = @_;
  my @tables = $dbh->tables();
  die "Database does not contain table beancounter. " .
    "Please run 'update_beancounter'.\n" unless grep /beancounter/, @tables;
  my $sql = q{select version from beancounter};
  my @res = $dbh->selectrow_array($sql) or die $dbh->errstr;
  my $dbschema = $res[0];
  my $num_required = ConvertVersionToLargeInteger($required);
  my $num_schema = ConvertVersionToLargeInteger($dbschema);
  print "Database has schema $dbschema, we require version $required\n"
    if $Config{debug};
  return ($num_schema < $num_required); # extensive testing was required =:-)
}

What am I doing wrong?

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.