UPGRADE INSTRUCTIONS

Upgrading to v3.0.1

static_class_info() changes

v3.0.1 introduces a separate class for the static class information. In theory, this change is backwards-compatible, but future evolutions of DBIx::NinjaORM may change the internals of DBIx::NinjaORM and break your implementations of static_class_info().

It is therefore strongly recommended to modify static_class_info() in your subclasses as follows:

  • Before:

    sub static_class_info
    {
    	my ( $class ) = @_;
    
    	# Load defaults.
    	my $info = $class->SUPER::static_class_info();
    
    	# Values specific to this class.
    	$info->{'key'} = 'value';
    	$info->{'...'} = '...';
    
    	return $info;
    }
  • After:

    sub static_class_info
    {
    	my ( $class ) = @_;
    
    	# Load defaults.
    	my $info = $class->SUPER::static_class_info();
    
    	# Values specific to this class.
    	# IMPORTANT: now set using set() instead of using a hash assignation.
    	$info->set(
    		{
    			'key' => 'value',
    			'...' => '...',
    		}
    	);
    
    	return $info;
    }

Deprecated methods

The following methods have been deprecated:

  • get_default_dbh()

    Replaced by get_info('default_dbh').

  • get_list_cache_time()

    Replaced by get_info('list_cache_time').

  • get_memcache()

    Replaced by get_info('memcache').

  • get_object_cache_time()

    Replaced by get_info('object_cache_time').

  • get_primary_key_name()

    Replaced by get_info('primary_key_name').

  • get_readonly_fields()

    Replaced by get_info('readonly_fields').

  • get_table_name()

    Replaced by get_info('table_name').

  • get_unique_fields()

    Replaced by get_info('unique_fields').

  • has_created_field()

    Replaced by get_info('created_field').

  • has_modified_field()

    Replaced by get_info('modified_field').

Those methods will still work for this release, but they will be removed in the next. In the meantime, they will print out a warning regarding the need to convert the caller to use the new get_info method.

AUTHOR

Guillaume Aubert, <aubertg at cpan.org>.

BUGS

Please report any bugs or feature requests through the web interface at https://github.com/guillaumeaubert/DBIx-NinjaORM/issues/new. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.

SUPPORT

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

perldoc DBIx::NinjaORM

You can also look for information at:

COPYRIGHT & LICENSE

Copyright 2009-2017 Guillaume Aubert.

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

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the LICENSE file for more details.