NAME

Data::Range::Compare::Stream::Result::Base - Result Objects Base class

SYNOPSIS

package SomeClass;

use base qw(Data::Range::Compare::Stream::Result::Base);
use overload
  'bool'=>\&boolean,
    '""'=>\&to_string,
      Fallback=>1;

DESCRIPTION

This package is the Base class for all Result classes. Result classes are defined as any objects returned by an iterator object instance while has_next is true.

OO Methods

  • my $obj=new Data::Range::Compare::Stream::Result::Base;

  • my $obj=new Data::Range::Compare::Stream::Result::Base(0,1);

  • my $obj=Data::Range::Compare::Stream::Result::Base->new;

  • my $obj=Data::Range::Compare::Stream::Result::Base->new(0,1);

    Object Constructor. Returns blessed anonymous array containing all arguments passed to the constructor

  • $obj->get_common

    Returns the common range object.

  • $obj->to_string

    Returns a string defined by:

    join ' - ',$obj->[0],$obj->[1];
  • print $obj;

    Returns the value of $obj->to_string

  • if($obj->boolean) { ... }

    Returns True

  • if($obj) { ... }

    When called in boolean context returns the value of $obj->boolean.

SEE ALSO

Data::Range::Compare::Stream::Cookbook

AUTHOR

Michael Shipper

Source-Forge Project

As of version 0.001 the Project has been moved to Source-Forge.net

Data Range Compare https://sourceforge.net/projects/data-range-comp/

COPYRIGHT

Copyright 2011 Michael Shipper. All rights reserved.

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.