NAME

DBIO::Candy::Exports - Create sugar for DBIO components

VERSION

version 0.900000

SYNOPSIS

package DBIO::SomeComponent;

sub create_widget { ... }

# so you don't depend on ::Candy
eval {
  require DBIO::Candy::Exports;
  DBIO::Candy::Exports->import;
  export_methods ['create_widget'];
  export_method_aliases {
    widget => 'create_widget'
  };
};

1;

The above will make it such that users of your component who use it with DBIO::Candy will have the methods you designate exported into their namespace.

DESCRIPTION

This module allows DBIO components to register sugar functions that DBIO::Candy will export into result classes that load those components.

METHODS

export_methods

export_methods [qw( foo bar baz )];

Define methods that get exported as subroutines of the same name.

export_method_aliases

export_method_aliases {
  old_method_name => 'new_sub_name',
};

Define methods that get exported as subroutines of a different name.

AUTHOR

DBIO & DBIx::Class Authors

COPYRIGHT AND LICENSE

Copyright (C) 2026 DBIO Authors Portions Copyright (C) 2005-2025 DBIx::Class Authors Based on DBIx::Class, heavily modified.

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