Skip to content

Instantly share code, notes, and snippets.

@ahalbert
Created May 29, 2016 13:44
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 ahalbert/e10146b45c021ea4ccb7da9610e9e2e0 to your computer and use it in GitHub Desktop.
Save ahalbert/e10146b45c021ea4ccb7da9610e9e2e0 to your computer and use it in GitHub Desktop.
use v6;
use Text::CSV;
class Periodic {
has @.elements;
method new() { die; }
}
{ BEGIN
Periodic.elements = csv(in => "../data/pt-data1.csv");
}
ERROR:
===SORRY!=== Error while compiling /Users/ahalbert/workspace/learning/chem/lib/element.pm6
An exception occurred while evaluating a BEGIN
at /Users/ahalbert/workspace/learning/chem/lib/element.pm6:9
Exception details:
===SORRY!=== Error while compiling
Invocant requires an instance of type Periodic, but a type object was passed. Did you forget a .new?
at :
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment