http://qs321.pair.com?node_id=452457


in reply to implementing 'push' in Class:MakeMethods

When you set up the slot as type 'list', you will have all the list methods.

ListFoo

#!/usr/bin/perl use strict; my $stuff = Todo::List->new(); $stuff->todo_push('I really need to read the docs.'); $stuff->todo_push('I will use the perldoc command.'); $stuff->todo_push('perldoc Class::MethodMaker'); while (my $todo = $stuff->todo_shift()) { print "$todo\n"; } #----------------------------------------------------------- package Todo::List; use strict; use Class::MethodMaker new_hash_init => [qw(new)], list => [qw(todo)];