![]() |
![]()
| ![]() |
![]()
NAMEText::Diff3::ListMixin - methods collection like as ruby-lang. VERSION0.08 SYNOPSISpackage AnyList; use base qw(Text::Diff3::ListMixin Text::Diff3::Base); sub list { return $_[0]->buffer } package AnyListUser; use SomeFactory; my $list = SomeFactory->new->create_anylist; $list->push($x, $y); $x = $list->pop; $list->unshift($x, $y); $x = $list->shift; until ($list->is_empty) { $x = $list->shift; $x = $list->first->foo; $y = $list->last->bar; } $list->size == 3 or die "excepts \$list->size == 3". $list->each(sub{ my($x) = @_; print $x, "\n"; }); DESCRIPTIONThis is a mix-in class derived delegates to the list attributes. METHODS
COMPATIBILITYUse new function style interfaces introduced from version 0.08. This module remained for backward compatibility before version 0.07. This module is no longer maintenance after version 0.08. AUTHORMIZUTANI Tociyuki "<tociyuki@gmail.com>". LICENSE AND COPYRIGHTCopyright (C) 2010 MIZUTANI Tociyuki This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version.
|