Games::AssaultCube::Log::Line::Base - The base log line object


Games-AssaultCube documentation Contained in the Games-AssaultCube distribution.

Index


Code Index:

NAME

Top

Games::AssaultCube::Log::Line::Base - The base log line object

ABSTRACT

Top

This module provides the base log line descriptions all other subclasses inherit from.

DESCRIPTION

Top

This module provides the base log line descriptions all other subclasses inherit from.

Attributes

Those attributes are the "generic" ones you can access. Please see the subclasses for additional attributes you can use.

line

The raw log line

event

The event specified by the line ( see subclasses for all possible event types )

tostr

A convenience attribute returning a nice string representing this event ( might differ from the line! )

AUTHOR

Top

Apocalypse <apocal@cpan.org>

Props goes to the BS clan for the support!

This project is sponsored by http://cubestats.net

COPYRIGHT AND LICENSE

Top


Games-AssaultCube documentation Contained in the Games-AssaultCube distribution.

# Declare our package
package Games::AssaultCube::Log::Line::Base;

# import the Moose stuff
use Moose;
use MooseX::StrictConstructor;

# Initialize our version
use vars qw( $VERSION );
$VERSION = '0.04';

# TODO improve validation for everything here, ha!

has 'line' => (
	isa		=> 'Str',
	is		=> 'ro',
	required	=> 1,
);

has 'event' => (
	isa		=> 'Str',
	is		=> 'ro',
	required	=> 1,
);

has 'tostr' => (
	isa		=> 'Str',
	is		=> 'ro',
	lazy		=> 1,
	default		=> sub {
		my $self = shift;
		return $self->line;
	},
);

no Moose;
__PACKAGE__->meta->make_immutable;

1;
__END__