Net::Twitter::Cabal::Tweet - A tweet used by Net::Twitter::Cabal


Net-Twitter-Cabal documentation Contained in the Net-Twitter-Cabal distribution.

Index


Code Index:

NAME

Top

Net::Twitter::Cabal::Tweet - A tweet used by Net::Twitter::Cabal

VERSION

Top

Version 0.01

SYNOPSIS

Top

Inside a cabal-controlling program:

	my $tweet = Net::Twitter::Cabal::Tweet->new( {
		poster  => $nick,
		content => "I'm inhaling",
	} );

This should only be used internally.

FUNCTIONS

Top

new

	my $tweet = Net::Twitter::Cabal::Tweet->new( {
		poster  => $nick,
		content => $text,
	} );

poster

content

Set/get the poster/content of a tweet:

	$tweet->poster( $nick ); $tweet->poster;
	$tweet->content( $content ); $tweet->content;

AUTHOR

Top

Pedro Figueiredo, <me at pedrofigueiredo.org>

BUGS

Top

Please report any bugs or feature requests to bug-net-twitter-cabal at rt.cpan.org, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=Net-Twitter-Cabal. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

Top

You can find documentation for this module with the perldoc command.

    perldoc Net::Twitter::Cabal::Tweet




You can also look for information at:

* RT: CPAN's request tracker

http://rt.cpan.org/NoAuth/Bugs.html?Dist=Net-Twitter-Cabal

* AnnoCPAN: Annotated CPAN documentation

http://annocpan.org/dist/Net-Twitter-Cabal

* CPAN Ratings

http://cpanratings.perl.org/d/Net-Twitter-Cabal

* Search CPAN

http://search.cpan.org/dist/Net-Twitter-Cabal/

ACKNOWLEDGEMENTS

Top

COPYRIGHT & LICENSE

Top


Net-Twitter-Cabal documentation Contained in the Net-Twitter-Cabal distribution.
package Net::Twitter::Cabal::Tweet;
#use Moose;

#has 'id'       => ( is => 'ro', isa => 'Int' );
#has 'content'  => ( is => 'rw', isa => 'Str', required => 1 );
#has 'poster'   => ( is => 'ro', isa => 'Str', required => 1 );
#has 'datetime' => ( is => 'ro', isa => 'DateTime' );
#has 'length'   => ( is => 'rw', isa => 'Int' );

use strict;
use warnings;

use base 'Class::Accessor::Fast';
__PACKAGE__->mk_accessors( qw/
	content
	poster
	/
);
# id and datetime left for a future release (w/ store and forward)
# length left for a future release (w/ tweet splitting)

use Carp;

#use DateTime;

our $VERSION = '0.01';


sub new {
	my $proto = shift;
	my $class = ref $proto || $proto;
	
	my $self  = $class->SUPER::new( @_ );
	croak unless ( $self->poster && $self->content );
	
	return $self;
}

45; # End of Net::Twitter::Cabal::Tweet