examples/new.pl
raw| 1 | use warnings; |
| 2 | use strict; |
| 3 | use feature 'say'; |
| 4 | |
| 5 | use Data::Dumper; |
| 6 | use IPC::Shareable; |
| 7 | |
| 8 | say "Before: " . IPC::Shareable::ipcs; |
| 9 | |
| 10 | my $h = IPC::Shareable->new( |
| 11 | key => 'blah', |
| 12 | create => 1, |
| 13 | destroy => 1 |
| 14 | ); |
| 15 | |
| 16 | $h->{one}{two} = 'hello, world!'; |
| 17 | $h->{one}{three}{four} = 1; |
| 18 | |
| 19 | print Dumper $h; |
| 20 | |
| 21 | IPC::Shareable::_end; |
| 22 | say "After: " . IPC::Shareable::ipcs; |