Skip to content

Instantly share code, notes, and snippets.

Last active January 15, 2017 00:37
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save anonymous/46bbf63a822192058a9ac9d06d8c4fb5 to your computer and use it in GitHub Desktop.
Save anonymous/46bbf63a822192058a9ac9d06d8c4fb5 to your computer and use it in GitHub Desktop.
[jdv@new-host-2 p6-agency.p5bug]$ cat lib/EmailAgent.pm6
use v6;
use Inline::Perl5;
use CPAN::Meta:from<Perl5>;
class EmailAgent {
method run {
CATCH { default {say "E:" ~ $_}}
CPAN::Meta.load_file;
}
}
[jdv@new-host-2 p6-agency.p5bug]$ cat test.pl6
use v6;
use EmailAgent;
#use CPAN::Meta:from<Perl5>;
EmailAgent.new(:id('foo')).run;
[jdv@new-host-2 p6-agency.p5bug]$ perl6 -Ilib test.pl6
E:Could not find symbol 'Meta'
[jdv@new-host-2 p6-agency.p5bug]$
[jdv@new-host-2 p6-agency.p5bug]$
[jdv@new-host-2 p6-agency.p5bug]$
[jdv@new-host-2 p6-agency.p5bug]$
[jdv@new-host-2 p6-agency.p5bug]$ cat test.pl6
use v6;
use EmailAgent;
use CPAN::Meta:from<Perl5>;
EmailAgent.new(:id('foo')).run;
[jdv@new-host-2 p6-agency.p5bug]$ perl6 -Ilib test.pl6
Use of uninitialized value $file in -r at /home/jdv/perl5/perlbrew/perls/perl-5.24.0/lib/5.24.0/CPAN/Meta.pm line 296.
E:load_file() requires a valid, readable filename at -e line 0.
[jdv@new-host-2 p6-agency.p5bug]$
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment