Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/coldfix/perl-ohashi

Ordered case-insensitive hashes for perl. Without dependencies.
https://github.com/coldfix/perl-ohashi

Last synced: 25 days ago
JSON representation

Ordered case-insensitive hashes for perl. Without dependencies.

Awesome Lists containing this project

README

        

### perl-ohashi

Very lightweight order-preserving case-insensitive hashes for perl.

#### Features

* no dependencies on any non-core modules
* very little code logic
* implemented as linked list to improve lookup speed on iteration

#### Usage

`ohashi`s can be created as references:

```perl
my $x = new ohashi(alpha => 'foo', beta => 'bar');
print $x->{AlpHA}; # prints 'foo'
```

or tied to a new variable:

```perl
tie (my %x, 'ohashi',
alpha => 1, beta => 2));
```

**Don't** try this:

```perl
my %x = (pi => 3.14);
tie (%x, 'ohashi');
```