/p5-Data-Linq

.NET's LINQ for Perl

Primary LanguagePerlOtherNOASSERTION

Build Status Coverage Status

NAME

Data::Linq - LINQ for Perl

SYNOPSIS

use Data::Linq;

my $mh = [
    { user => { id => 1, name => 'Sherlock' }, toys => 'Psychokinesis' },
    { user => { id => 2, name => 'Nero' },     toys => 'Direct Hack' },
    { user => { id => 3, name => 'Elly' },     toys => 'Tri-Ascend' },
    { user => { id => 4, name => 'Cordelia' }, toys => 'Hyper Sensitive' },
];

my $result = enumerable(@$mh)->where(user => {id => { '>' => 3})
                             ->select('toys')->to_array; # $result => ['Try-Ascend', 'Hyper Sensitive']

DESCRIPTION

.NET's LINQ for Perl, Inspired from linq.js

NOTE

THIS MODULE IS UNDER-DEVELOPMENT
Please send issue and/or pull-request casually.

METHOD

.NET's Linq Standard Methods (Some may delete/add)

  • aggregate
  • all
  • any
  • average
  • contains
  • count
  • default_if_empty
  • element_at
  • empty
  • first
  • last
  • long_count
  • max
  • min
  • of_type
  • range
  • repeat
  • select
  • select_many
  • sequence_equal
  • single
  • sum
  • to_array
  • to_dictionary
  • to_list
  • to_lookup
  • where

SEE ALSO

LICENSE

Copyright (C) htk291

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

AUTHOR

htk291 htk291@gmail.com