Matthew Phillips > Data-Perl-0.002004 > Data::Perl

Download:
Data-Perl-0.002004.tar.gz

Dependencies

Annotate this POD

CPAN RT

Open  0
View/Report Bugs
Module Version: 0.002004   Source   Latest Release: Data-Perl-0.002007

NAME ^

Data::Perl - Base classes wrapping fundamental Perl data types.

VERSION ^

version 0.002004

SYNOPSIS ^

  use Data::Perl;

  my $array = array(1,2,3, qw/a b c/);

  $array->count; # 6

  my @elements = $array->grep(sub {/b/}); # (b)

  my $hash = hash(a => 1, b => 2);

  $hash->keys; # ('a', 'b');

  my $number = number(5);

  $number->add(10); # 15

  my $string = string("foo\n");

  $string->chomp; # return 1, chomps string

  my $counter = counter();

  $counter->inc; # counter is now 1

  my $sub = code(sub { 'foo' });

  $sub->execute; # returns 'foo'

  $foo

DESCRIPTION ^

Data::Perl is a collection of classes that wrap fundamental data types that exist in Perl. These classes and methods as they exist today are an attempt to mirror functionality provided by Moose's Native Traits. One important thing to note is all classes currently do no validation on constructor input.

Data::Perl is a container class for the following classes:

ALPHA API ^

The API provided by these modules is as of now considered alpha and undecided. The API WILL change. If you are writing code that you will not touch again for years, do not use this until this warning is removed.

PROVIDED FUNCTIONS ^

Data::Perl exports helper constructor functions to interface with the above classes:

THANKS ^

Much thanks to the Moose team for their work with native traits, for which much of this work is based.

SEE ALSO ^

AUTHOR ^

Matthew Phillips <mattp@cpan.org>

COPYRIGHT AND LICENSE ^

This software is copyright (c) 2013 by Matthew Phillips <mattp@cpan.org>.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.

syntax highlighting: