Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tbrowder/shareable
Provides a parent class with shareable and semi-persistent state
https://github.com/tbrowder/shareable
Last synced: about 1 month ago
JSON representation
Provides a parent class with shareable and semi-persistent state
- Host: GitHub
- URL: https://github.com/tbrowder/shareable
- Owner: tbrowder
- License: artistic-2.0
- Created: 2021-12-31T12:17:36.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2021-12-31T15:51:11.000Z (about 3 years ago)
- Last Synced: 2024-12-09T19:50:20.791Z (about 2 months ago)
- Language: Raku
- Size: 8.79 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: Changes
- License: LICENSE
Awesome Lists containing this project
README
[![Actions Status](https://github.com/tbrowder/Shareable/workflows/test/badge.svg)](https://github.com/tbrowder/Shareable/actions)
NAME
====Shareable - Provides a parent class with shareable and semi-persistent state
SYNOPSIS
========```raku
use Shareable;
class Foo is Shareable {
has $.ID;
}
my $o = Foo.new: :ID(1);
say $o.ID; # OUTPUT: «1»
$o.store; # or, alternatively, '$o.save'my $b = Foo.from-store;
say $b.ID; # OUTPUT: «1»
```DESCRIPTION
===========**Shareable** is a class designed to be a parent class for your own class which needs some shared, persistent state. It was designed specifically for use by the author's module **Date::Liturgical::Christian** in order to "look back" to the day previous for any special days that needed to be held over a day. **WARNING: As such, it is not suitable for sharing state between independent processes!**
AUTHOR
======Tom Browder
COPYRIGHT AND LICENSE
=====================Copyright 2021 Tom Browder
This library is free software; you may redistribute it or modify it under the Artistic License 2.0.