| 1 | package Eirotic; | ||
| 2 | # ABSTRACT: use perl *my* way | ||
| 3 | our $VERSION = '0.2'; | ||
| 4 | |||
| 5 | =head1 SYNOPSIS | ||
| 6 | |||
| 7 | writting | ||
| 8 | |||
| 9 | use Eirotic; | ||
| 10 | |||
| 11 | replaces this boilerplate | ||
| 12 | |||
| 13 | use 5.20.0; | ||
| 14 | use strict; | ||
| 15 | use warnings qw( FATAL all ); | ||
| 16 | use experimental 'signatures'; | ||
| 17 | use Perlude; | ||
| 18 | use curry; | ||
| 19 | use Path::Tiny; | ||
| 20 | require YAML; | ||
| 21 | |||
| 22 | =head1 CHANGES | ||
| 23 | |||
| 24 | =head1 v0.1 (2015) | ||
| 25 | |||
| 26 | =over 4 | ||
| 27 | |||
| 28 | =item * | ||
| 29 | |||
| 30 | C<Eirotic> moved to C<Eirotic::514>. | ||
| 31 | |||
| 32 | =item * | ||
| 33 | |||
| 34 | C<IO::All> replaced by C<Path::Tiny>. | ||
| 35 | |||
| 36 | =item * | ||
| 37 | |||
| 38 | L<https://metacpan.org/pod/Method::Signatures> replaced by CORE experimental ones. | ||
| 39 | |||
| 40 | =back | ||
| 41 | |||
| 42 | =head1 Yet experimenting | ||
| 43 | |||
| 44 | =head2 Unicode everywhere | ||
| 45 | |||
| 46 | is utf8::all a good idea ? use C<use> instead of my own import? | ||
| 47 | |||
| 48 | =head2 List::AllUtils ? | ||
| 49 | |||
| 50 | temptation is strong but i don't want to conflict with perlude, even in the | ||
| 51 | user's brain. | ||
| 52 | |||
| 53 | what about the idea from C<Book> (used in Perlude): use a very short NS. like | ||
| 54 | C<A> for C<Array> and C<S> for stream? | ||
| 55 | |||
| 56 | =head2 About autodie and fatal warnings | ||
| 57 | |||
| 58 | seems to be nice but maybe i should read | ||
| 59 | U<http://blogs.perl.org/users/peter_rabbitson/2014/01/fatal-warnings-are-a-ticking-time-bomb-via-chromatic.html> | ||
| 60 | |||
| 61 | =head1 CREDITS | ||
| 62 | |||
| 63 | Author: Marc Chantreux <marcc@cpan.org> | ||
| 64 | |||
| 65 | =cut | ||
| 66 | |||
| 67 | 3 | ▶ | use strict (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 68 | 3 | ▶ | use warnings (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 69 | 3 | ▶ | use feature (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 70 | 3 | ▶ | use autodie (); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 71 | require Perlude; | ||
| 72 | require YAML; | ||
| 73 | 3 | ▶ | use curry; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 74 | require Path::Tiny; | ||
| 75 | require Import::Into; | ||
| 76 | |||
| 77 | sub import { | ||
| 78 | |||
| 79 | 0 | ▶ | my ( $what ) = pop; |
|
Subroutine
import: not called CC=1 SCAR=2.0
| |||
| 80 | 0 | my ( $caller ) = caller; | |
| 81 | |||
| 82 | 0 | feature->import(':5.20'); # use 5.20.0; | |
| 83 | 0 | strict->import; # use strict; | |
| 84 | 0 | warnings->import; # use warnings qw( FATAL all ); | |
| 85 | # warnings->import(qw( FATAL all )); # use warnings qw( FATAL all ); | ||
| 86 | |||
| 87 | #use experimental 'signatures'; | ||
| 88 | |||
| 89 | 0 | feature->import('signatures'); | |
| 90 | 0 | warnings->unimport("experimental::signatures"); | |
| 91 | |||
| 92 | 3 | ▶ | use Perlude; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 93 | 3 | ▶ | use Path::Tiny; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 94 | |||
| 95 | #return unless $what eq "-full"; | ||
| 96 | 0 | Perlude->import::into($caller); | |
| 97 | 0 | Path::Tiny->import::into($caller); | |
| 98 | |||
| 99 | } | ||
| 100 | |||
| 101 | 1; | ||
| 102 | |||