Permalink
Browse files

Add Vector.Num trap so we can get better error messages.

  • Loading branch information...
1 parent 5df5605 commit 5dfc043496dd0c0d6f575402c493df77b63dd5e0 SF committed Oct 12, 2009
Showing with 5 additions and 0 deletions.
  1. +5 −0 lib/Vector.pm
View
@@ -24,6 +24,11 @@ class Vector
self.WHAT.perl ~ ".new(" ~ @.coordinates.map({.perl}).join(', ') ~ ")";
}
+ multi method Num()
+ {
+ die "Cannot call Num on Vector!";
+ }
+
method Dim()
{
@.coordinates.elems;

0 comments on commit 5dfc043

Please sign in to comment.