The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Crane::Base - Minimal base class for Crane projects.

SYNOPSIS

  use Crane::Base;

DESCRIPTION

Import this package is equivalent to:

  use strict;
  use warnings;
  use utf8;
  use feature qw( :5.14 );
  use open qw( :std :utf8 );
  
  use Carp;
  use English qw( -no_match_vars );
  use IO::Handle;
  use Readonly;

EXAMPLES

Script usage

  use Crane::Base;
  
  say 'Hello!' or croak($OS_ERROR);

Package usage

  package Example;
  
  use Crane::Base qw( Exporter );
  
  Readonly::Scalar(our $CONST => 'value');
  
  our @EXPORT = qw(
      &example
      $CONST
  );
  
  sub example {
      say 'This is an example!' or croak($OS_ERROR);
  }
  
  1;

ENVIRONMENT

BASE_PATH

Used to determine the base directory for the application environment.

AUTHOR

Tema Novikov, <novikov.tema@gmail.com>

COPYRIGHT AND LICENSE

Copyright 2013-2014 Tema Novikov.

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