| 1 | # Stash.pmc | ||
| 2 | # | ||
| 3 | # Copyright 2009-2010, Larry Wall | ||
| 4 | # | ||
| 5 | # You may copy this software under the terms of the Artistic License, | ||
| 6 | # version 2.0 or later. | ||
| 7 | |||
| 8 | use 5.010; | ||
| 9 | package Stash; | ||
| 10 | sub new { | ||
| 11 | my $class = shift; | ||
| 12 | my %attrs = @_; | ||
| 13 | bless \%attrs, $class; | ||
| 14 | } | ||
| 15 | sub idref { return $_[0]->{'!id'} }; | ||
| 16 | sub id { return $_[0]->{'!id'}->[0] // '???' }; | ||
| 17 | sub file { return $_[0]->{'!file'} }; | ||
| 18 | sub line { return $_[0]->{'!line'} }; | ||
| 19 | 1; |