1autobox::Core(3)      User Contributed Perl Documentation     autobox::Core(3)
2
3
4

NAME

6       autobox::Core - Core functions exposed as methods in primitive types
7

SYNOPSIS

9         use autobox::Core;
10
11         "Hello, World\n"->uc->print;
12

DESCRIPTION

14       The autobox module lets you call methods on primitive datatypes such as
15       scalars and arrays.
16
17       autobox::CORE defines methods for core operations such as "join",
18       "print", most everything in perlfunc, some things from Scalar::Util and
19       List::Util, and some Perl 5 versions of methods taken from Perl 6.
20
21       These methods expose as methods the built-in functions for minipulating
22       numbers, strings, arrays, hashes, and code references.
23
24       It can be handy to use built-in functions as methods to avoid messy
25       dereferencing syntaxes and parentheses pile ups.
26
27       autobox::Core is what you'd call a stub module. It is mostly glue,
28       presenting existing functions with a new interface. Most of the methods
29       read like "sub hex ($) { hex($_[0]) }".  Besides built-ins that operate
30       on hashes, arrays, scalars, and code references, some Perl 6-ish things
31       were thrown in, and some keyword like "foreach" have been turned into
32       methods.
33
34   What's Implemented?
35       All of the functions listed in perldoc under the headings: "Functions
36       for real @ARRAYs", "Functions for real %HASHes", "Functions for list
37       data", and "Functions for SCALARs or strings", plus a few taken from
38       other sections and documented below.  Methods from Scalar::Util and
39       List::Util were thrown in.  Some things expected in Perl 6, such as
40       "last" ("last_idx"), "elems", and "curry", have been thrown in.
41       "flatten" explicitly flattens an array.  Functions such as "add" have
42       been defined for numeric operations.
43
44       Here's a small sample:
45
46         print [10, 20, 30, 40, 50]->pop, "\n";
47         print [10, 20, 30, 40, 50]->shift, "\n";
48
49         my $arrref = [10, 20, 30];
50
51         my $lala;
52         $lala = "Lalalalala\n"; print "chomp: ", $lala->chomp, ' ', $lala, "\n";
53         $lala = "Lalalalala\n"; print "lcfirst: ", $lala->lcfirst, ' ', $lala, "\n";
54
55         my $hashref = { foo => 10, bar => 20, baz => 30, qux => 40 };
56
57         print "hash keys: ", $hashref->keys->join(' '), "\n"; # or if you prefer...
58         print "hash keys: ", join ' ', $hashref->keys(), "\n";
59
60       Of the built-in stuff, only a few stragglers such as "srand" were
61       excluded.
62
63       Scalar String Related Methods
64
65       "concat" is the "." operator.
66
67       "strip" is not a built-in operator or function but is instead one of a
68       number of user-defined convinience methods.  "strip" strips out
69       whitespace from the beginning and end of a string.  This is redundant
70       and subtely different from "trim" XXX.
71
72       "trim" strips out whitespace from the beginning and end of a string.
73
74       "title_case", "center", "ltrim", "rtrim", and "trim" were taken from
75       perl5i.
76
77       "split" is called on a non-reference scalar with the regular expression
78       passed in. This is done for consistency with "m" and "s".
79
80         print "10, 20, 30, 40"->split(qr{, ?})->elements, "\n";
81
82       "chomp", "chop", "chr", "crypt", "index", "lc", "lcfirst", "length",
83       "ord", "pack", "reverse", "rindex", "sprintf", "substr", "uc",
84       "ucfirst", "unpack", "quotemeta", "vec", "undef", "m", "nm", "s",
85       "split".  "eval", "system", and "backtick".
86
87       "nm" corresponds to "!~".
88
89       "m" is "m//". "$foo->m(/bar/)" corresponds to "$foo =~ m/bar/". "s" is
90       "s///".  To use "m" and "s", pass a regular expression created with
91       "qr//" and specify its flags as part of the regular expression using
92       the "(?imsx-imsx)" syntax documented in perlre.  "m" returns an array
93       reference so that things such as "map" and "grep" may be called on the
94       result.
95
96         my ($street_number, $street_name, $apartment_number) =
97             "1234 Robin Drive #101"->m(qr{(\d+) (.*)(?: #(\d+))?})->elements;
98
99         print "$street_number $street_name $apartment_number\n";
100
101       "undef" assigns "undef" to the value.  It is not a test.  XXX for some
102       reason, there's no "defined".
103
104       center()
105
106           my $centered_string = $string->center($length);
107           my $centered_string = $string->center($length, $character);
108
109       Centers $string between $character.  $centered_string will be of length
110       $length.
111
112       $character defaults to " ".
113
114           say "Hello"->center(10);        # "   Hello  ";
115           say "Hello"->center(10, '-');   # "---Hello--";
116
117       "center()" will never truncate $string.  If $length is less than
118       "$string->length" it will just return $string.
119
120           say "Hello"->center(4);        # "Hello";
121
122       I/O
123
124       "print" and "say".
125
126       Number Related Methods
127
128       "abs", "atan2", "cos", "exp", "int", "log", "oct", "hex", "rand",
129       "sin", and "sqrt" are named after the built-in functions of the same
130       name.
131
132       Operators were given names as follows:  "add", "and", "band", "bor",
133       "bxor", "cmp", "dec", "div", "eq", "flip", "ge", "gt", "inc", "le",
134       "lshift", "lt", "mod", "mult", "mcmp", "ne", "neg", "meq", "mge",
135       "mgt", "mle", "mlt", "mne", "not", "or", "pow", "rpt", "rshift", "sub",
136       "xor".
137
138       "flip" is "~" which is the binary (rather than boolean) "not".
139
140       "lshift" is "<<" and "rshift" is ">>".
141
142       "mge" is ">=".  "<mle"> is "<=".  I'm not sure where the "m" came from.
143
144       "sub" is subtract, I think, but it should not be named the same as the
145       anonymous subroutine constructor XXX.
146
147       is_number
148
149           $is_a_number = $thing->is_number;
150
151       Returns true if $thing is a number understood by Perl.
152
153           12.34->is_number;           # true
154           "12.34"->is_number;         # also true
155
156       is_positive
157
158           $is_positive = $thing->is_positive;
159
160       Returns true if $thing is a positive number.
161
162       0 is not positive.
163
164       is_negative
165
166           $is_negative = $thing->is_negative;
167
168       Returns true if $thing is a negative number.
169
170       0 is not negative.
171
172       is_integer
173
174           $is_an_integer = $thing->is_integer;
175
176       Returns true if $thing is an integer.
177
178           12->is_integer;             # true
179           12.34->is_integer;          # false
180
181       is_int
182
183       A synonym for is_integer
184
185       is_decimal
186
187           $is_a_decimal_number = $thing->is_decimal;
188
189       Returns true if $thing is a decimal number.
190
191           12->is_decimal;             # false
192           12.34->is_decimal;          # true
193           ".34"->is_decimal;          # true
194
195       That's it.
196
197       Reference Related Methods
198
199       Besides the "Functions for SCALARs" section of perlfunc, the following
200       were implemented, where they make sense: "tie", "tied", "ref", "undef",
201       "bless", and "vec".  "tie", "tied", and "undef" don't work on code
202       references, and "bless" doesn't work on non-reference scalars (okay,
203       that's no longer true).  "quotemeta" works on non-reference scalars,
204       along with "split", "m", and "s" for regular expression operations.
205       "ref" is the same as the "ref" keyword in that it tells you what kind
206       of a reference something is if it's a reference; XXX there's currently
207       no counterpart to the "\" operator, which takes something and gives you
208       a reference to it.
209
210       Array Methods
211
212       Array methods work on both arrays and array references:
213
214         my $arr = [ 1 .. 10 ];
215         $arr->undef;
216
217       Or:
218
219         my @arr = [ 1 .. 10 ];
220         @arr->undef;
221
222       Arrays can tell you how many elements they contain and the index of
223       their last element:
224
225         my $arr = [ 1 .. 10 ];
226         print '$arr contains ', $arr->size,
227               ' elements, the last having an index of ', $arr->last_index, "\n";
228
229       Array references have a "flatten" method to dump their elements.  This
230       is the same as "@{$array_ref}".
231
232         my $arr = [ 1 .. 10 ];
233         print join ' -- ', $arr->flatten, "\n";
234
235       List context forces methods to return a list:
236
237         my @arr = ( 1 .. 10 );
238         print join ' -- ', @arr->grep(sub { $_ > 3 }), "\n";
239
240       Methods may be chained; scalar context forces methods to return a
241       reference:
242
243         my @arr = ( 1 .. 10 );
244         print @arr->grep(sub { $_ > 3 })->min, "\n";
245
246       Arrays can be iterated on using "for" and "foreach". Both take a code
247       reference as the body of the for statement.  "foreach" passes the
248       current element itself in each pass.  "for" passes the index of the
249       current element in to that code block, and then the current element,
250       and then a reference to the array itself.
251
252         my $arr = [ 1 .. 10 ];
253         $arr->foreach(sub { print $_[0], "\n" });
254         $arr->for(sub { die unless $_[1] == $_[2]->[$_[0]] });
255
256       "sum" is a toy poke at doing Language::Functional-like stuff:
257
258         print $arrref->sum, "\n";
259
260       Methods for array creation:  "to", "upto", and "downto".
261
262         1->to(5);      # creates [1, 2, 3, 4, 5]
263         1->upto(5);    # creates [1, 2, 3, 4, 5]
264         5->downto(5);  # creates [5, 4, 3, 2, 1]
265
266       These wrap the ".." operator.
267
268         $arr->first(sub { /5/ });
269
270       head
271
272           my $first = @list->head;
273
274       Returns the first element from @list.
275
276       tail
277
278           my @list = qw(foo bar baz quux);
279           my @rest = @list->tail;  # [ 'bar', 'baz', 'quux' ]
280
281       Returns all but the first element from @list. In scalar context returns
282       an array reference.
283
284       Optionally, you can pass a number as argument to ask for the last $n
285       elements:
286
287           @rest = @list->tail(2); # [ 'baz', 'quux' ]
288
289       slice
290
291           my @sublist = @list->slice(@indexes);
292
293       Returns a list containing the elements from @list at the indices
294       @indices. In scalar context, returns an array reference.
295
296       range
297
298           my @sublist = @list->range( $lower_idx, $upper_idx );
299
300       Returns a list containing the elements from @list with indices ranging
301       from $lower_idx to $upper_idx. Returns an array reference in scalar
302       context.
303
304       last_index
305
306           my $last_index = @array->last_index
307
308       Returns @array's last index. Optionally, takes a Coderef or a Regexp,
309       in which case it will return the index of the last element that matches
310       such regex or makes the code reference return true. Example:
311
312           my @things = qw(pear poll potato tomato);
313
314           my $last_p = @things->last_index(qr/^p/); # 2
315
316       first_index
317
318           my $first_index = @array->first_index; # 0
319
320       For simmetry, returns the first index of @array. If passed a Coderef or
321       Regexp, it will return the index of the first element that matches.
322
323           my @things = qw(pear poll potato tomato);
324
325           my $last_p = @things->first_index(qr/^t/); # 3
326
327       Hash Methods
328
329       "each" is like "foreach" but for hash references. For each key in the
330       hash, the code reference is invoked with the key and the corresponding
331       value as arguments:
332
333         my $hashref = { foo => 10, bar => 20, baz => 30, quux => 40 };
334         $hashref->each(sub { print $_[0], ' is ', $_[1], "\n" });
335
336       There is currently no way to have the elements sorted before they are
337       handed to the code block. If someone requests a way of passing in a
338       sort criteria, I'll implement it.
339
340       "slice" takes a list of hash keys and returns the corresponding values
341       e.g.
342
343         my %hash = (
344             one   => 'two',
345             three => 'four',
346             five  => 'six'
347         );
348
349         print %hash->slice(qw(one five))->join(' and '); # prints "two and six"
350
351       flip()
352
353       Exchanges values for keys in a hash.
354
355           my %things = ( foo => 1, bar => 2, baz => 5 );
356           my %flipped = %things->flip; # { 1 => foo, 2 => bar, 5 => baz }
357
358       If there is more than one occurence of a certain value, any one of the
359       keys may end up as the value.  This is because of the random ordering
360       of hash keys.
361
362           # Could be { 1 => foo }, { 1 => bar }, or { 1 => baz }
363           { foo => 1, bar => 1, baz => 1 }->flip;
364
365       Because hash references cannot usefully be keys, it will not work on
366       nested hashes.
367
368           { foo => [ 'bar', 'baz' ] }->flip; # dies
369
370       Code Methods
371
372       You may "curry" code references:
373
374         $adding_up_numbers = sub {
375             my $first_number = shift;
376             my $second_number = shift;
377             return $first_number + $second_number;
378         };
379
380         my $adding_five_to_numbers = $adding_up_numbers->curry(5);
381
382         $adding_five_to_numbers->(20)->print; "\n"->print;
383
384       "times" executes a coderef a given number of times:
385
386         5->times(sub { print "hi\n"});   # XXX likely to change but it's in the code so bloody doc it so I have incentive to rethink it
387
388       XXX round this out
389
390   What's Missing?
391       Many operators.  I'm tired.  I'll do it in the morning.  Maybe.  Send
392       me a patch.  Update:  Someone sent me a patch for numeric operations.
393
394       File and socket operations are already implemented in an object-
395       oriented fashion care of IO::Handle, IO::Socket::INET, and IO::Any.
396
397       Functions listed in the perlfunc headings "System V interprocess
398       communication functions", "Fetching user and group info", "Fetching
399       network info", "Keywords related to perl modules", "Functions for
400       processes and process groups", "Keywords related to scoping", "Time-
401       related functions", "Keywords related to the control flow of your perl
402       program", "Functions for filehandles, files, or directories", and
403       "Input and output functions".  These things are likely implemented in
404       an object oriented fashion by other CPAN modules, are keywords and not
405       functions, take no arguments, or don't make sense as part of the
406       string, number, array, hash, or code API.  "srand" because you probably
407       shouldn't be using it.
408
409       "each" on hashes. There is no good reason it is missing.  XXX.
410
411   Autoboxing
412       This section quotes four pages from the manuscript of Perl 6 Now: The
413       Core Ideas Illustrated with Perl 5 by myself, Scott Walters. The text
414       appears in the book starting at page 248. This copy lacks the benefit
415       of copyedit - the finished product is of higher quality. See the
416       shameless plug in the SEE ALSO section for information on ordering Perl
417       6 Now.
418
419       A box is an object that contains a primitive variable.  Boxes are used
420       to endow primitive types with the capabilities of objects.  This is
421       essential in strongly typed languages but never strictly required in
422       Perl.  Programmers might write something like "my $number =
423       Int->new(5)".  This is manual boxing.  To autobox is to convert a
424       simple type into an object type automatically, or only conceptually.
425       This is done by the language.  It makes a language look to programmers
426       as if everything is an object while the interpreter is free to
427       implement data storage however it pleases.  Autoboxing is really making
428       simple types such as numbers, strings, and arrays appear to be objects.
429
430       "int", "num", "bit", "str", and other types with lower case names, are
431       primitives.  They're fast to operate on, and require no more memory to
432       store than the data held strictly requires.  "Int", "Num", "Bit",
433       "Str", and other types with an initial capital letter, are objects.
434       These may be subclassed (inherited from) and accept traits, among other
435       things.  These objects are provided by the system for the sole purpose
436       of representing primitive types as objects, though this has many
437       ancillary benefits such as making "is" and "has" work.  Perl provides
438       "Int" to encapsulate an "int", "Num" to encapsulate a "num", "Bit" to
439       encapsulate a "bit", and so on.  As Perl's implementations of hashes
440       and dynamically expandable arrays store any type, not just objects,
441       Perl programmers almost never are required to box primitive types in
442       objects.  Perl's power makes this feature less essential than it is in
443       other languages.
444
445       ing makes primitive objects and they're boxed versions equivalent.  An
446       "int" may be used as an "Int" with no constructor call, no passing,
447       nothing.  This applies to constants too, not just variables:
448
449         # Perl 6 - autoboxing associates classes with primitives types:
450
451         print 4.sqrt, "\n";
452
453       This is perfectly valid Perl 6.
454
455       All of this applies to hashes and arrays, as well:
456
457         # Perl 6 - autoboxing associates classes with primitive types:
458
459         print [ 1 .. 20 ].elems, "\n";
460
461       The language is free to implement data storage however it wishes but
462       the programmer sees the variables as objects.
463
464       Expressions using autoboxing read somewhat like Latin suffixes.  In the
465       autoboxing mind-set, you might not say that something is "made more
466       mnemonic", but has been "mnemonicified".
467
468       Autoboxing may be mixed with normal function calls.  In the case where
469       the methods are available as functions and the functions are available
470       as methods, it is only a matter of personal taste how the expression
471       should be written:
472
473         # Calling methods on numbers and strings, these three lines are equivalent
474         # Perl 6
475
476         print sqrt 4;
477         print 4.sqrt;
478         4.sqrt.print;
479
480       The first of these three equivalents assumes that a global "sqrt()"
481       function exists.  This first example would fail to operate if this
482       global function were removed and only a method in the "Num" package was
483       left.
484
485       Perl 5 had the beginnings of autoboxing with filehandles:
486
487         use IO::Handle;
488         open my $file, '<', 'file.txt' or die $!;
489         $file->read(my $data, -s $file);
490
491       Here, "read" is a method on a filehandle we opened but never blessed.
492       This lets us say things like "$file->print(...)" rather than the often
493       ambagious
494
495       "print $file ...".  To many people, much of the time, it makes more
496       conceptual sense as well.
497
498       Reasons to Box Primitive Types
499
500       What good is all of this?
501
502       Makes conceptual sense to programmers used to object interfaces as the
503       way to perform options.
504       Alternative idiom. Doesn't require the programmer to write or read
505       expressions with complex precedence rules or strange operators.
506       Many times that parenthesis would otherwise have to span a large
507       expression, the expression may be rewritten such that the parenthesis
508       span only a few primitive types.
509       Code may often be written with fewer temporary variables.
510       Autoboxing provides the benefits of boxed types without the memory
511       bloat of actually using objects to represent primitives. Autoboxing
512       "fakes it".
513       Strings, numbers, arrays, hashes, and so on, each have their own API.
514       Documentation for an "exists" method for arrays doesn't have to explain
515       how hashes are handled and vice versa.
516       Perl tries to accommodate the notion that the "subject" of a statement
517       should be the first thing on the line, and autoboxing furthers this
518       agenda.
519
520       Perl is an idiomatic language and this is an important idiom.
521
522       Subject First: An Aside
523
524       Perl's design philosophy promotes the idea that the language should be
525       flexible enough to allow programmers to place the  of a statement
526       first.  For example, "die $! unless read $file, 60" looks like the
527       primary purpose of the statement is to "die".  While that might be the
528       programmers primary goal, when it isn't, the programmer can communicate
529       his real primary intention to programmers by reversing the order of
530       clauses while keeping the exact same logic: "read $file, 60 or die $!".
531       Autoboxing is another way of putting the subject first.  Nouns make
532       good subjects, and in programming, variables, constants, and object
533       names are the nouns.  Function and method names are verbs.
534       "$noun->verb()" focuses the readers attention on the thing being acted
535       on rather than the action being performed.  Compare to "$verb($noun)".
536
537       Autoboxing and Method Results
538
539       In Chapter 11 [Subroutines], we had examples of ways an expression
540       could be written.  Here it is again:
541
542         # Various ways to do the same thing:
543
544         print(reverse(sort(keys(%hash))));          # Perl 5 - pathological parenthetic
545         print reverse sort keys %hash;              # Perl 5 - no unneeded parenthesis
546
547         print(reverse(sort(%hash,keys))));          # Perl 6 - pathological
548         print reverse sort %hash.keys;              # Perl 6 - no unneeded parenthesis
549
550         %hash.keys ==> sort ==> reverse ==> print;  # Perl 6 - pipeline operator
551
552         %hash.keys.sort.reverse.print;              # Perl 6 - autobox
553
554         %hash->keys->sort->reverse->print;          # Perl 5 - autobox
555
556       This section deals with the last two of these equivalents.  These are
557       method calls
558         use autobox::Core;
559         use Perl6::Contexts;
560
561         my %hash = (foo => 'bar', baz => 'quux');
562
563         %hash->keys->sort->reverse->print;          # Perl 5 - autobox
564
565         # prints "foo baz"
566
567       Each method call returns an array reference, in this example.  Another
568       method call is immediately performed on this value.  This feeding of
569       the next method call with the result of the previous call is the common
570       mode of use of autoboxing.  Providing no other arguments to the method
571       calls, however, is not common.
572
573       Perl6::Contexts recognizes object context as provided by "->" and
574       coerces %hash and @array into references, suitable for use with
575       autobox.  (Note that autobox also does this automatically as of version
576       2.40.)  autobox associates primitive types, such as references of
577       various sorts, with classes.  autobox::Core throws into those classes
578       methods wrapping Perl's built-in functions.  In the interest of full
579       disclosure, Perl6::Contexts and autobox::Core are my creations.
580
581       Autobox to Simplify Expressions
582
583       One of my pet peeves in programming is parenthesis that span large
584       expression.  It seems like about the time I'm getting ready to close
585       the parenthesis I opened on the other side of the line, I realize that
586       I've forgotten something, and I have to arrow back over or grab the
587       mouse.  When the expression is too long to fit on a single line, it
588       gets broken up, then I must decide how to indent it if it grows to 3 or
589       more lines.
590
591         # Perl 5 - a somewhat complex expression
592
593         print join("\n", map { CGI::param($_) } @cgi_vars), "\n";
594         # Perl 5 - again, using autobox:
595
596         @cgi_vars->map(sub { CGI::param($_[0]) })->join("\n")->concat("\n")->print;
597
598       The autoboxed version isn't shorter, but it reads from left to right,
599       and the parenthesis from the "join()" don't span nearly as many
600       characters.  The complex expression serving as the value being
601       "join()"ed in the non-autoboxed version becomes, in the autoboxed
602       version, a value to call the "join()" method on.
603
604       This "print" statement takes a list of CGI parameter names, reads the
605       values for each parameter, joins them together with newlines, and
606       prints them with a newline after the last one.
607
608       Pretending that this expression were much larger and it had to be
609       broken to span several lines, or pretending that comments are to be
610       placed after each part of the expression, you might reformat it as
611       such:
612
613         @cgi_vars->map(sub { CGI::param($_[0]) })  # turn CGI arg names into values
614                  ->join("\n")                      # join with newlines
615                  ->concat("\n")                    # give it a trailing newline
616                  ->print;                          # print them all out
617
618       This could also have been written:
619
620         sub { CGI::param($_[0]) }->map(@cgi_vars)  # turn CGI arg names into values
621                  ->join("\n")                      # join with newlines
622                  ->concat("\n")                    # give it a trailing newline
623                  ->print;                          # print them all out
624
625       "map()" is .  The "map()" method defined in the "autobox::Core::CODE"
626       package takes for its arguments the things to map.  The "map()" method
627       defined in the "autobox::Core::ARRAY" package takes for its argument a
628       code reference to apply to each element of the array.
629
630       Here ends the text quoted from the Perl 6 Now manuscript.
631

BUGS

633       Yes. Report them to the author, scott@slowass.net.  The API is not yet
634       stable -- Perl 6-ish things and local extensions are still being
635       renamed.
636

HISTORY

638       Version 1.3 fixes version 1.2 losing the MANIFEST and being essentially
639       a null upload.  Bah!
640
641       Version 1.2 merges in brunov's "flip", "center", "last_index", "slice",
642       "range", documentation, and various bug fixes.
643
644       Version 1.1 actually adds the tests to the MANIFEST so they get
645       bundled.  Thanks to <http://github.com/daxim> daxim/Lars DIECKOW for
646       clearing out the RT queue (which I didn't know existed), merging in the
647       fixes and features that still applied, which were several.
648
649       Version 1.0 is identical to 0.9.  PAUSE tells me 0.9 already exists so
650       bumping the number.  *^%$!
651
652       Version 0.9 is identical to 0.8.  PAUSE tells me 0.8 already exists so
653       bumping the number.
654
655       Version 0.8 fixes "unshift" and "pop" to again return the value removed
656       (oops, thanks brunov) and adds many, many more tests (wow, thanks
657       brunov!).
658
659       Version 0.7 uses autobox itself so you don't have to, as requested, and
660       ... oh hell.  I started editing this to fix Schwern's reported v-string
661       warning, but I'm not seeing it.  Use "~~" on "@array->grep" if we're
662       using 5.10 or newer.  Add an explicit LICENSE section per request.
663       Took many tests and utility functions from perl5i.  Pays attention to
664       "wantarray" and returns a list or the reference, as dictated by
665       context.  "flatten" should rarely if ever be needed any more.
666
667       Version 0.6 propogates arguments to "autobox" and doesn't require you
668       to use "autobox".  I still can't test it and am applying patches
669       blindly.  Maybe I'll drop the Hash::Util dep in the next version since
670       it and Scalar::Util are constantly wedging on my system.  The
671       documentation needs to be updated and mention of Perl6::Contexts mostly
672       removed.  Also, JJ contributed a "strip" method for scalars - thanks
673       JJ!
674
675       Version 0.5 has an $arrayref->unshift bug fix and and a new flatten
676       method for hashes.  Also, this version is untested because my
677       Hash::Util stopped working, dammit.
678
679       Version 0.4 got numeric operations, if I remember.
680
681       Version 0.3 fixes a problem where "unpack" wasn't sure it had enough
682       arguments according to a test introduced in Perl 5.8.6 or perhaps
683       5.8.5.  This problem was reported by Ron Reidy - thanks Ron!  Version
684       0.3 also added the references to Perl 6 Now and the excerpt.
685
686       Version 0.2 rounded out the API and introduced the beginnings of
687       functional-ish methods.
688
689       Version 0.1 was woefully incomplete.
690
692       Copyright (C) 2009, 2010 by Scott Walters and various contributors
693       listed (and unlisted) below
694
695       This library is free software; you can redistribute it and/or modify it
696       under the same terms as Perl itself, either Perl version 5.8.9 or, at
697       your option, any later version of Perl 5 you may have available.
698
699       This library is distributed in the hope that it will be useful, but
700       without any warranty; without even the implied warranty of
701       merchantability or fitness for a particular purpose.
702

SEE ALSO

704       autobox
705       Moose::Autobox
706       Perl6::Contexts
707       http://github.com/gitpan/autobox-Core
708       <http://github.com/gitpan/autobox-Core>
709       IO::Any
710       Perl 6: <http://dev.perl.org/perl6/apocalypse/>.
711       (Shameless plug:) Perl 6 Now: The Core Ideas Illustrated with Perl 5
712       dedicates a sizable portion of Chapter 14, Objects, to autoboxing and
713       the idea is used heavily throughout the book. Chapter 8, Data
714       Structures, also has numerous examples. See <http://perl6now.com> or
715       look for ISBN 1-59059-395-2 at your favorite bookstore for more
716       information.
717

AUTHORS

719       Scott Walters, scott@slowass.net.
720
721       Michael Schwern and the perl5i contributors for tests, code, and
722       feedback.
723
724       JJ contributed a "strip" method for scalars - thanks JJ!
725
726       Ricardo SIGNES contributed patches.
727
728       Thanks to Matt Spear, who contributed tests and definitions for numeric
729       operations.
730
731       Mitchell N Charity reported a bug and sent a fix.
732
733       Thanks to chocolateboy for autobox and for the encouragement.
734
735       Thanks to Bruno Vecchi for bug fixes and many, many new tests going
736       into version 0.8.
737
738       Thanks to <http://github.com/daxim> daxim/Lars DIECKOW pushing in fixes
739       and patches from the RT queue along with fixes to build and additional
740       doc examples.
741
742
743
744perl v5.12.3                      2010-03-19                  autobox::Core(3)
Impressum