Lines Matching refs:magic
23 my (@plain,@magic);
29 my $magic = new HTML::DOM::NodeList::Magic sub { @magic };
30 isa_ok $magic, 'HTML::DOM::NodeList::Magic';
32 ok DOES $magic 'HTML::DOM::NodeList', 'magic node list does NodeList';
35 @magic = qw'Hos lytrotheisa ton deinon eucharisteria';
41 is +(item $magic 3), 'deinon', 'item (magic)';
43 is $$magic[3], 'deinon', 'overloading (magic)';
45 is $magic->length, 5, 'length (magic)';
51 splice @magic, 2,1;
53 is +(item $magic 3), 'deinon', 'item when magic list is stale';
54 is $magic->length, 5, 'length when magic list is stale';
56 $magic->_you_are_stale;
59 is +(item $magic 3), 'eucharisteria', 'item after modification (magic)';
61 is $$magic[3], 'eucharisteria', 'overloading after modification (magic)';
63 is $magic->length, 4, 'length after modification (magic)';
70 bless $magic, ref $magic;
71 undef $magic;
79 $magic = new HTML::DOM::NodeList::Magic sub { $doc->childNodes }, $doc;
80 $magic->length; # call the sub and populate it
82 is $magic->length, 2, 'second arg to magic node list constructor automatically registers the node l…