This is an automated email from the git hooks/post-receive script. lkajan pushed a commit to branch master in repository libfreecontact-perl.
commit 3328c2df39358f7b4de9200572f17b4351fac719 Author: Laszlo Kajan <[email protected]> Date: Thu May 30 18:13:26 2013 +0200 Imported Upstream version 0.02 --- Changes | 3 +++ FreeContact.xsp | 2 +- MANIFEST.SKIP | 2 ++ META.yml | 2 +- lib/FreeContact.pm | 16 +++++++++++++--- t/02test.t | 4 ++-- 6 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Changes b/Changes index dbe1443..b141935 100644 --- a/Changes +++ b/Changes @@ -1,5 +1,8 @@ Revision history for Perl extension FreeContact. +0.02 Mon May 27 19:28:22 CEST 2013 + - new() method now takes a hash of arguments + 0.01 Mon Apr 29 14:09:10 2013 - original version; created by h2xs 1.23 with options -n FreeContact -b 5.10.1 --omit-constant --skip-ppport /usr/include/freecontact.h -lfreecontact diff --git a/FreeContact.xsp b/FreeContact.xsp index b8294b8..f116681 100644 --- a/FreeContact.xsp +++ b/FreeContact.xsp @@ -23,7 +23,7 @@ get_ps_psicov() // Example: /usr/share/doc/libextutils-xspp-perl/examples/Object-WithIntAndString/Object-WithIntAndString.xsp %name{FreeContact::Predictor} class predictor { - predictor(bool __dbg = false); + %name{_new} predictor(bool __dbg = false); ~predictor(); // lkajan: I apparently can not use this to add an INIT: block to the XS diff --git a/MANIFEST.SKIP b/MANIFEST.SKIP index 0e81c31..943d68e 100644 --- a/MANIFEST.SKIP +++ b/MANIFEST.SKIP @@ -39,3 +39,5 @@ FreeContact.c .swp$ .vim$ + +^debian diff --git a/META.yml b/META.yml index a190a62..8dd3041 100644 --- a/META.yml +++ b/META.yml @@ -1,6 +1,6 @@ --- #YAML:1.0 name: FreeContact -version: 0.01 +version: 0.02 abstract: fast protein contact predictor author: - Laszlo Kajan <[email protected]> diff --git a/lib/FreeContact.pm b/lib/FreeContact.pm index e957a68..a4e113f 100644 --- a/lib/FreeContact.pm +++ b/lib/FreeContact.pm @@ -34,12 +34,22 @@ our @EXPORT = qw( ); -our $VERSION = '0.01'; +our $VERSION = '0.02'; require XSLoader; XSLoader::load('FreeContact', $VERSION); # Preloaded methods go here. +sub FreeContact::Predictor::new +{ + my $class = shift(@_); + if(scalar(@_)%2){ confess("Odd number of arguments"); } + my %args = @_; + return $class->_new( + defined($args{dbg}) ? $args{dbg} : () + ); +} + sub FreeContact::Predictor::run { my $self = shift(@_); @@ -117,7 +127,7 @@ respective method. =over -=item new( [DEBUG] ) +=item new( dbg => bool ) Creates an "FreeContact::Predictor". @@ -130,7 +140,7 @@ Creates an "FreeContact::Predictor". =item run( ali => I<[]>, clustpc => dbl, sparsity => dbl, gapth => dbl, mincontsep => uint, pseudocnt => dbl, pscnt_weight => dbl, estimate_ivcov => bool, shrink_lambda => dbl, cov20 => bool, gap_incovm => bool, veczw => bool, rho => dbl, - [num_threads => int, [timing => I<{}>]] ) + [num_threads => int], [timing => I<{}>] ) Defaults for the arguments are obtained with get_ps_evfold(). diff --git a/t/02test.t b/t/02test.t index c69fba4..6c30f3a 100644 --- a/t/02test.t +++ b/t/02test.t @@ -13,7 +13,7 @@ sub check_obj { } { - my $o = FreeContact::Predictor->new(1); check_obj($o); + my $o = FreeContact::Predictor->new(dbg => 1); check_obj($o); eval { my $res = $o->run(undef); }; @@ -29,7 +29,7 @@ sub check_obj { my $num_threads = 1; # test will not work with 0 my $timing = {}; - my $res = FreeContact::Predictor->new(1)->run(ali => \@aln, num_threads => $num_threads, timing => $timing); + my $res = FreeContact::Predictor->new(dbg => 1)->run(ali => \@aln, num_threads => $num_threads, timing => $timing); is(reftype($res), 'HASH'); ok(($res->{fro}->[126+125]->[2]-8.08998)/8.08998 < 1e-6, 'precision test'); # [ 2, 3, 8.08998+- ] -- Alioth's /git/debian-med/git-commit-notice on /srv/git.debian.org/git/debian-med/libfreecontact-perl.git _______________________________________________ debian-med-commit mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/debian-med-commit
