The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
Revision history for Class-Dot

2.0_15 Tue Feb 05 17:15:00 GMT+1 2007 [asksh@cpan.org]

    - Fixed bug with the Object type constraint where the default's
      value's instance would be constructed with ->new(q{}) instead of
      ->new(()). Patch thanks to Cosimo Streppone [cosimo@opera.com].

    - dotperltags now supports the has() keyword.

    - Fixed bugs with the Hash type constraint.

2.0_12 Mon Jan 07 21:30:00 GMT+1 2007 [asksh@cpan.org]

    - The new() constructor now supports other argument types than a hash
      reference.

    - Dependencies now reflecting the state of Debian stable.

2.0_11 Mon Jan 07 18:39:00 GMT+1 2007 [asksh@cpan.org]

    - Fixed a bug in the Object types default value factory where the
      arguments sometimes was evaluated the wrong way (sometimes they
      were suddently evaluated in scalar context instead of list context).

2.0_10 Mon Jan 07 13:17:00 GMT+1 2007 [asksh@cpan.org]

    - No API Changes.

    - Added policies: Class::Dot::Policy::Mutator,
      Class::Dot::Policy::Constrained and Class::Dot::Policy::Affordance.

    - Attributes now can have choose between different privacy settings:
        public (alias: rw), private (alias: ro) and writeonly (alias: wo).
      This means that a public attribute will have both set and get accessor,
      a private attribute will only have get accessor, and a writeonly
      accessor will only have a set accessor.

    - Lots of new tests. Tests has been categorized in a additional directory
      level. Old 1.x tests has been moved to t/010-std_1.x_tests/, New 2.x
      tests is now in t/020-std_2.x_tests/. Also some tests from Moose has
      been adopted (thanks to the Moose team!).

    - More documentation. The documentation is still not complete though.

    - In older perls (atleast in 5.6.2) any Class->isa('UNIVERSAL') returns
      true, so had to fix Class Name to use the way Class::Plugin::Util uses instead.

    - Changed dependency Test::Exception from recommended to build_requires.

    - Registry variables now lexical instead of global.

    - Massive clean-up. The huge Class::Dot module now split up into a vast
      number of modules, making Class::Dot a lot more extensible.

    - All Class::Dot classes now inherits from Class::Dot::Object.

    - All Class::Dot classes now has their own metaclass instance.
  
    - The base class for all types (DotX) now renamed to Class::Dot::Type.
     
    - Class::Dot::Types now renamed to Class::Dot::Typemap.

    - Typemap generator now does type inheritance lookup to find fields
      (default_value & constraint).

    - Mutators will be created if neither -setter_prefix or -getter_prefix is
      set. (See Class::Dot::Policy::Mutator).

    - __getattr__ now initialize the default type if the attribute has not
       been accessed by the get accessor yet.

    - Base class for types (DotX) renamed to Class::Dot::Type. The name was
      not satisfactory, sorry for any inconvenience this name has caused.
      We're now a good CPAN citizen again :)

    - All Class::Dot classes now inherits from Class::Dot::Object.
      (this might change to mixin in the future, we'll see how it works out).

2.0_09 Fri Dec 21 20:11:52 GMT+1 2007 [asksh@cpan.org]

    - lib/Class/Dot/Types.pm is now auto generated from the Typemap file.

    - *EXPERIMENTAL* Types can now have constraints. That means that you can have the set_
      accessor check if the given value actually conforms to the type of the
      property.

      Since this feature is experimental and can break code written for
      earlier versions of Class::Dot, you have to explicitly turn it on for a
      class via the use-line with the -constraints option, like this:

        use Class::Dot qw(:new -constraints);

      All Class::Dot options are on a class by class basis, so setting this
      option in one class, won't affect the others.
    
    - You can now use Class::Dot as a drop-in replacement for Moose in some
      situations.  (Depending on how much of Moose's feature-set you use).
        - Supports the Moose (has 'name' => ...) keyword.
        - Support for all Moose types.
        - Supports the Moose extends() keyword.
        - Supports type constraints via the -constraints class option.

        - Does not support roles.
        - Does not support the __PACKACKE__->meta method.
        - Does not suppoer after, augment, before etc.

    - NOTE: Now dies if you supply unknown class options on the use-line.

2.0_08 Thu Dec 20 12:44:43 GMT+1 2007 [asksh@cpan.org]

    - There was a bug in the ISA traversal. It would not fetch recursive
      inheritance. This is now fixed.

    - Class::Dot now uses mro::get_linear_isa if available. (mro was
      introduced in perl 5.9.5 and is included with the recent 5.10.0 release)

      mro::get_linear_isa is _much_ faster than the regular isa traversal
      implementation we use that is pure perl, so you might get better
      performance by upgrading to perl 5.10.0.
   
      NOTE FOR USERS OF PERL < 5.10.0 AND Class::C3

      If are already using the C3 method resolution order for your classes,
      you can install the MRO::Compat and Class::C3::XS modules to get
      a ISA traversal method implemented in C for older perl's.

      MRO::Compat's ISA traversal method for the DFS method resolution
      order is actually slower than Class::Dot's, but because of how the way
      MRO::Compat works we can't disable it if it is in installed.

    - Class::Dot now tries to load Class::Dot::XS which is a speed-up module
      in the making. It will be uploaded to CPAN when it's finished.

2.0_08 Wed Dec 19 13:49:14 GMT+1 2007 [asksh@cpan.org]
    - Reported by: srezic@cpan.org Subject: FAIL Class-Dot-2.0.0_07 MSWin32-x86-multi-thread 5.1
    Fixlog:
    Fixed problem on Win32 where extra zeros where padded to the version numbers:

    t/properties..............
    %   Failed test 'default class version is 1'
    %   at t/properties.t line 315.
    %          got: '1.000'
    %     expected: '1'

    %   Failed test 'create class without methods'
    %   at t/properties.t line 329.
    %          got: '2.480'
    %     expected: '2.48'
    % Looks like you failed 2 tests of 115.

2.0_07 Mon Dec 17 18:40:04 GMT+1 2007 [asksh@cpan.org]
    - Added an optimization to the property inheritance traveral that is in
      effect if the class does not use inheritance.

2.0_06 Mon Dec 17 14:35:44 GMT+1 2007 [asksh@cpan.org]
    
    - Test coverage is now 98%

    - strict and warnings are now automatically imported when you load
      Class::Dot. This could potentially break code, but you did use strict
      and warnings, didn't you? (This feature was inspired by Moose).

    - Names for anonymous subroutines are properly set if Sub::Name is
      installed. This is very useful for debugging purposes.

    - Added extends() function. It works like {use base}, but doesn't have all
      the fields related business inside.

    - Added composite() function. Let's you use composition to define a has-a
      relationship to other classes. The composite class is automatically
      loaded and a property is made.

      Example:

        composite another_class => 'AnotherClass';

      is the same as:

        property another_class => isa_Object('AnotherClass', auto => 1);
    

    - Types are now objects and you can get their type and default value by
      doing:

        package MyClass;

        use Class::Dot qw(-new :std);

        property name => isa_String("hello world!");

        sub print_name_meta {
            my ($self) = @_;

            my $name_type = $self->__meta__('name');

            # Prints: String
            print "Name type: ", $name_type->type(), "\n";

            # Prints: hello world!
            print "Name defval: ", $name_type->default_value(), "\n";

            return;
        }

      

2.0_05 Mon Dec 10 23:49:46 GMT+1 2007 [asksh@cpan.org]

    - The set accessors for properties named _property will no longer be
     set__property, but will have the more intuitive name _set_property.
     The same goes for __property and __set_property (which before got the
     name set___property).

    - You can now finalize your class to speed it up. After finalization
    the inheritance tree is pre-cached, and ISA will no longer be traversed.
    The backside is that you can't add any new properties after finalization.

    Examples:

        # To finalize any class from anywhere.
        Class::Dot::finalize_class($class_name);

        # To finalize the class of an instance.
        $instance->__finalize__

        # The see if a class is finalized or not.
        if ($instance->__is_finalized__) {
            print ref $instance, " is finalized";
        }

    You would probably want to live without finalization.
    If you really need this, be really sure you need it by profiling
    your code and not by guessing.

2.0_04 Sat Oct 31 22:46:10 GMT+1 2007 [asksh@cpan.org]

    - New feature: You can now do chained accessors by using the -chained use
      option. Example:

        package Person;
        use Class::Dot qw(-new -chained :std);

        property name  => isa_String;
        property email => isa_String;
        property age   => isa_Int;

        package main;

        my $person = Person->new()
            ->name('Ask')
            ->email('asksh@cpan.org')
            ->age(25);

    - Module::Install updated to 0.68.

2.0_03 Tue Oct 30 01:19:37 GMT+1 2007 [asksh@cpan.org]

    - New and more readable SYNOPSIS.

    - A perl.vim syntax highlighting file for vim that also highlights
      'property' in contrib/vim/syntax. Read contrib/vim/README for more
      information.

    - Types separated from Class::Dot and moved into Class::Dot::Types.

2.0_02 Mon Oct 29 18:08:12 GMT+1 2007 [asksh@cpan.org]

    - License changed to the Modified BSD license,
      however if you ask me nicely I might give you permission to use
      it with another license.

    - Now using Module::Install instead of Module::Build.
      (there was problems with using version::qv with M::B).

    - New test script to make sure we are compatible with older perls.
      (Right now we try to make it work with perl 5.6.0, but if we like something
      that is not supported in 5.6.0 we will leave it for 5.8.1).

    - Had to move ./Build wikidoc functionality into it's own script. (Since
      we're not using Module::Build anymore).

    - I've started signing the distribution with my PGP key.

    - Bumped the META version we ensure specification for to 1.3. (was 1.2).

* Changed to BSD license.

2.0_01 Sun Oct 28 17:16:32 GMT+1 2007 [asksh@cpan.org]

    - Code cleanup.

    - Class::Dot now installs new methods to the object it creates:

        - __setattr__($self, $attribute_name, $value):
        
        Set a object attribute. This is great for those times when you want to
        do this:
    
            my %some_default_values = (
                'foo' => 'bar',
                'bar' => 'baz',
                'xuzzy' => 'fuzzy',
            );
    
            while (my ($attr_name, $attr_value) = each %some_default_values) {
            my $set_attribute = 'set_' . $attr_name;
            if ($object->can($set_attribute)) {
                $object->$set_attribute( $attr_value );
                }
            }
    

        This isn't very pretty, so that's why you now can do this:

            while (my ($attr_name, $attr_value) = each %some_default_values) {
                $object->__setattr__($attr_name, $attr_value);
            }


        - $val = __getattr__($self, $attribute_name)

        Get an attributes value.

        - $bool = __hasattr__($self, $attribute_name)

        Returns true if $self has the attribute $attribute_name.

    - Now you can't do this anymore;

        $object->{attribute} = $value;

    because now the attributes are better hidden in the object's hash.
    You can probably find out how they are saved by doing keys %{ $object },
    but we _recommend against accessing that hash directly_!.

    
    - Now you can override properties simply by writing;

        property name => isa_String('foo');

        sub name {
            my ($self) = @_;
            warn 'Accessing name property';
            return $self->__getattr__('name');
        }

        sub set_name {
            my ($self, $new_name) = @_;
            warn $self->__getattr__('name') . " is changing name to $new_name";
            $self->__setattr__('name', $new_name);
            return;
        }

    instead of using after_property_get() and after_property_set().

    (Note: Just be sure not to use property() in a BEGIN block, you have to use
    after_property_* to do that!)

1.0.5  Mon Oct 01 17:13:03 GMT+1 2007 [asksh@cpan.org]
    -  isa_File added (a Filehandle).
    -  isa_Code added (a code reference).
    -  Added import option: -rebuild.
       If you return something blessed from your BUILD method and -rebuild
       option is set, it will set $self to that.

1.0.4  Thu Sep 20 16:30:11 GMT+1 2007 [asksh@cpan.org]
    -  The created constructor (when using -new import tag option) didn't
       search ISA properly while setting properties using options to new().
    -  isa_Data now sets default value properly.


1.0.3  Thu Sep 12 16:55:48 GMT+1 2007 [asksh@cpan.org]
    -  isa_Int and isa_String set the initial value to 0 and q{} when no
       default value was defined, this resulted in `defined $property` to
       return true.

1.0.2  Tue Sep 12 10:13:04 GMT+1 2007 [asksh@cpan.org]
    -  Subversion now hosted at googlecode.
       http://class-dot.googlecode.comsearch

1.0.1  Tue Sep 11 24:36:32 GMT+1 2007 [asksh@cpan.org]
    -  isa_Object no longer automatically makes new objects if the property is
       not set. If you want that, use: isa_Object('My::Class', auto => 1);
    -  Fixed problems with isa_Object where it would try to make
       a new instance even though no default class was defined.

0.0.1  Sun Sep  9 02:22:58 GMT+1 2007 [asksh@cpan.org]
       Initial release.

=for stopwords ISA Oct