-
-
Save leedo/cc2f52430291aee95c6f8102472e840c to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env perl6 | |
use v6; | |
use Test; | |
use Web::Scraper; | |
{ | |
my $scraper = Web::Scraper.new; | |
isa-ok $scraper, "Web::Scraper"; | |
} | |
{ | |
isa-ok &scraper, "Code"; | |
} | |
{ | |
my $scraper = scraper(); | |
isa-ok $scraper, "Web::Scraper"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use v6; | |
class Web::Scraper { | |
use XML::LibXML::XPathContext:from<Perl5>; | |
sub scraper() is export { | |
return Web::Scraper.new; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
laylward@fastlee:~/src/p6-web-scraper (master *)$ perl6 -Ilib t/basic.t | |
===SORRY!=== Error while compiling /Users/laylward/src/p6-web-scraper/t/basic.t | |
Undeclared routine: | |
scraper used at lines 14, 18 | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ok 1 - The object is-a '"Web::Scraper"' | |
ok 2 - The object is-a '"Code"' | |
ok 3 - The object is-a '"Web::Scraper"' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment