~ubuntu-branches/ubuntu/trusty/librdf-trine-perl/trusty

« back to all changes in this revision

Viewing changes to lib/RDF/Trine/Parser/Turtle/Token.pm

  • Committer: Package Import Robot
  • Author(s): Jonas Smedegaard, Jonas Smedegaard
  • Date: 2012-12-11 04:17:02 UTC
  • mfrom: (1.2.2)
  • Revision ID: package-import@ubuntu.com-20121211041702-tfqq2grzobwynjpm
Tags: 1.002-1
* New upstream release.
  Highlights:
  + Replaced old Turtle and TriG parsers with new streaming
    implementations.
  + Added RDF::Trine::Node::Literal->canonicalize method.
  + Updated RDF::Trine::Parser::Redland to construct a new parser
    object on each parse (avoiding a bug in redland).
  + Applied partial patch to 'fix interaction with
    HTML::Data::Parser'.
  + Added POD to RDF::Trine and RDF::Trine::Store::DBI.
  + Silenced undefined warnings in RDF::Trine::Parser::Turtle::Lexer.
  + Silenced warning of cartesian joins in
    RDF::Trine::Store::Hexastore.

[ Jonas Smedegaard ]
* Bump debhelper compatibility level to 8.
* Update package relations:
  + (Build-)depend on libmoose-perl and libmoosex-arrayref-perl.
  + Relax to build-depend unversioned on cdbs: Needed version
    satisfied in stable, and oldstable no longer supported.
* Update copyright file:
  + Expand Files section authored by Toby Inkster, and extend
    coverage.
  + Fix use comment and license pseudo-sections to obey silly
    restrictions of copyright format 1.0.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
package RDF::Trine::Parser::Turtle::Token;
 
2
 
 
3
use 5.010;
 
4
use strict;
 
5
use warnings;
 
6
use MooseX::ArrayRef;
 
7
 
 
8
has type => ( is => 'ro', );
 
9
has start_line => ( is => 'ro', );
 
10
has start_column => ( is => 'ro', );
 
11
has line => ( is => 'ro', );
 
12
has column => ( is => 'ro', );
 
13
has args => ( is => 'ro', );
 
14
 
 
15
=begin private
 
16
 
 
17
=item C<< value >>
 
18
 
 
19
Returns the token value.
 
20
 
 
21
=cut
 
22
 
 
23
sub value {
 
24
        my $self        = shift;
 
25
        my $args        = $self->args;
 
26
        return $args->[0];
 
27
}
 
28
 
 
29
=item C<< fast_constructor ( $type, $line, $col, \@args ) >>
 
30
 
 
31
Returns a new token object.
 
32
 
 
33
=cut
 
34
 
 
35
# This constructor relies on the list of attributes not changing order!
 
36
sub fast_constructor {
 
37
        my $class = shift;
 
38
        bless \@_, $class;
 
39
}
 
40
 
 
41
__PACKAGE__->meta->make_immutable;
 
42
 
 
43
1;
 
44
 
 
45
=end private