Data-Chronicle

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
"subscribe" in Data::Chronicle::Subscriber
 
    Given a category, name, and callback assigns the callback to be called
    when a new value is set for the specified category and name (if the
    writer has publish_on_set enabled).
 
        $subscriber->subscribe("category1", "name2", sub { print 'Hello World' });
 
 "unsubscribe" in Data::Chronicle::Subscriber
 
    Given a category, name, clears the callbacks associated with the
    specified category and name.
 
        $subscriber->unsubscribe("category1", "name2");
 
EXAMPLES
 
        my $d = get_some_log_data();
     
        my $chronicle_w = Data::Chronicle::Writer->new(
            cache_writer => $writer,

lib/Data/Chronicle.pm  view on Meta::CPAN

89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
    my $some_old_data = $reader->get_for("category1", "name2", 2);
 
=head2 L<Data::Chronicle::Subscriber/subscribe>
 
Given a category, name, and callback assigns the callback to be called when a new value is set for the specified category and name (if the writer has publish_on_set enabled).
 
    $subscriber->subscribe("category1", "name2", sub { print 'Hello World' });
 
=head2 L<Data::Chronicle::Subscriber/unsubscribe>
 
Given a category, name, clears the callbacks associated with the specified category and name.
 
    $subscriber->unsubscribe("category1", "name2");
 
=head1 EXAMPLES
 
    my $d = get_some_log_data();
 
    my $chronicle_w = Data::Chronicle::Writer->new(
        cache_writer => $writer,
        dbic         => $dbic);



( run in 0.282 second using v1.01-cache-2.11-cpan-ec4f86ec37b )