Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fix require for new syntax: http://rakudo.org/2017/03/18/lexical-requ…
  • Loading branch information
cjfields committed Mar 21, 2017
1 parent 4d18c31 commit 335c484
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 11 deletions.
18 changes: 8 additions & 10 deletions lib/Bio/SeqIO.pm6
Expand Up @@ -8,34 +8,32 @@ class Bio::SeqIO does Bio::Role::Pluggable['SeqIO']
does Bio::Role::RecordFormat
#does Bio::Role::IO
{

has $!plugin handles <next-Seq write-Seq>;

submethod BUILD(:$!format,
:$!format-version?,
:$!format-variant?,
*%args) {

if $!format ~~ / <[-]> / {
($!format, $!format-variant) = $!format.split: '-', 2;
} else {
$!format = $!format.lc;
}

my $plugin = "Bio::SeqIO::" ~ $!format;

try {
require ::($plugin);
};


try require ::($plugin);

if ::($plugin) ~~ Failure {
#note(@*INC.join("\t"));
die "Can't load $plugin: $!";

} else {
$!plugin = ::($plugin).new(|%args);
}
}

method guess-format { ... }
}
1 change: 0 additions & 1 deletion t/SeqIO.t
Expand Up @@ -5,7 +5,6 @@ use lib './lib';
use Test;

use Bio::SeqIO;
use Bio::SeqIO::fasta;

ok(1);

Expand Down

0 comments on commit 335c484

Please sign in to comment.