<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">NAME
    MooseX::RW - Moose::Role reader/writer

VERSION
    version 0.003

SYNOPSIS
    Let suppose you have a voice box on you phone. You want to display all
    number of your messages.

     package VoiceBox::Reader;
     
 use Moose;
     use Phone;
     
 with MooseX::RW::Reader;
     
 # VoIP phone
     has phone =&gt; ( is =&gt; 'rw', isa =&gt; 'Phone', required =&gt; 1 );
     
 sub read {
        my $self = shift;
        my $vb = $phone-&gt;voicebox;
        my $count = $self-&gt;count;
        return if $vb-&gt;count &gt;= $count;
        my $msg = $phone-&gt;voicebox-&gt;get_msg($count);
        $self-&gt;count($count+1);
        return $msg;
     }
     
 package Main;
     
 my $phone = Phone-&gt;new( url =&gt; 'a.b.c.d' );
     my $reader = VoiceBox::Reader-&gt;new( phone =&gt; $phone );
     while ( $msg = $reader-&gt;read() ) {
        say $msg-&gt;count, ": ", $msg-&gt;from;
     }

ATTRIBUTES
  count
    Count of items/records which have been handled by reader/writer.

METHODS
  begin
    Not required method which could be called by a processor at the begining
    of a process.

  end
    Not required method which could be called by a processor at the end of a
    process.

AUTHOR
    FrĂŠdĂŠric Demians &lt;f.demians@tamil.fr&gt;

COPYRIGHT AND LICENSE
    This software is Copyright (c) 2012 by FrĂŠderic DĂŠmians.

    This is free software, licensed under:

      The GNU General Public License, Version 3, June 2007

</pre></body></html>