summaryrefslogtreecommitdiff
path: root/lib/Data/MultiValued/Tags.pm
diff options
context:
space:
mode:
Diffstat (limited to 'lib/Data/MultiValued/Tags.pm')
-rw-r--r--lib/Data/MultiValued/Tags.pm42
1 files changed, 29 insertions, 13 deletions
diff --git a/lib/Data/MultiValued/Tags.pm b/lib/Data/MultiValued/Tags.pm
index a42caf4..38ed17d 100644
--- a/lib/Data/MultiValued/Tags.pm
+++ b/lib/Data/MultiValued/Tags.pm
@@ -26,19 +26,6 @@ sub _build__storage {
Data::MultiValued::TagContainer->new();
}
-sub _rebless_storage {
- my ($self) = @_;
-
- bless $self->{_storage},'Data::MultiValued::TagContainer';
-}
-
-sub _as_hash {
- my ($self) = @_;
-
- my %ret = %{$self->_storage};
- return {_storage=>\%ret};
-}
-
sub set {
my ($self,%args) = validated_hash(
@@ -73,6 +60,21 @@ sub clear {
}
+sub _rebless_storage {
+ my ($self) = @_;
+
+ bless $self->{_storage},'Data::MultiValued::TagContainer';
+}
+
+
+sub _as_hash {
+ my ($self) = @_;
+
+ my %ret = %{$self->_storage};
+ return {_storage=>\%ret};
+}
+
+
1;
__END__
@@ -137,6 +139,20 @@ exceptions: if the tag does not exist, nothing happens.
Not passing in a C<tag> clears everything. Yes, this means that there
is no way to just clear the value for the C<undef> tag.
+=head1 Serialisation helpers
+
+These are used through
+L<Data::MultiValued::UglySerializationHelperRole>.
+
+=head2 C<_rebless_storage>
+
+Blesses the storage into L<Data::MultiValued::TagContainer>.
+
+=head2 C<_as_hash>
+
+Returns the internal representation with no blessed hashes, with as
+few copies as possible.
+
=head1 SEE ALSO
L<Data::MultiValued::TagContainer>, L<Data::MultiValued::Exceptions>