Permalink
Browse files

fix require for new syntax: http://rakudo.org/2017/03/18/lexical-requ…

  • Loading branch information...
1 parent 4d18c31 commit 335c4848f0673c7fed1545bb762ba5bbed1f4b7c @cjfields committed Mar 21, 2017
Showing with 8 additions and 11 deletions.
  1. +8 −10 lib/Bio/SeqIO.pm6
  2. +0 −1 t/SeqIO.t
View
@@ -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 { ... }
}
View
@@ -5,7 +5,6 @@ use lib './lib';
use Test;
use Bio::SeqIO;
-use Bio::SeqIO::fasta;
ok(1);

0 comments on commit 335c484

Please sign in to comment.