App-CELL

 view release on metacpan or  search on metacpan

Build.PL  view on Meta::CPAN

    },
    build_requires     => { 
        'Log::Any::Test'     => 0,
        'File::ShareDir::Install' => 0.11,
        'File::Spec'         => 0,
        'File::Temp'         => 0,
        'Params::Validate'   => 0,
        'Test::More'         => 0,
        'Test::Output'       => 0,
        'Test::Warnings'     => 0,
        'Try::Tiny'          => 0,
    },
    requires           => {
        'perl'                  => 5.012,
        'Date::Format'          => 0,
        'File::HomeDir'         => 0,
        'File::ShareDir'        => 1.0,
        'File::Next'            => 0,
        'Log::Any'              => 0,
        'Log::Any::Adapter'     => 0.10,
        'Params::Validate'      => 0,
        'Try::Tiny'             => 0,
    },
    meta_merge => {
        resources => {
            repository => 'https://github.com/smithfarm/cell',
            bugtracker => 'https://github.com/smithfarm/cell/issues',
        }
    },
    add_to_cleanup     => [ 'App-CELL-*' ],
    # create_makefile_pl => 'traditional',
);

Changes  view on Meta::CPAN

- config/CELL_Message_en.conf: add CELL_OVERWRITE_META_PARAM message
- Config.pm: use CELL_OVERWRITE_META_PARAM
- Load.pm: make functions and log messages easier to follow
- open bug #23 Put sprintf into eval block in Message->new

0.087  2014-05-11 13:36
- (Perl::Critic) add .perlcriticrc, disable "no strict 'refs'" warnings
- (Perl::Critic) use two-argument form of 'bless' 
- (Perl::Critic) convert nested subroutine into anonymous subroutine 
- (Perl::Critic) avoid explicit 'return undef'
- replace 'eval' with Try::Tiny, update dependencies
- Message.pm turn warnings into exceptions in 'new' (close ticket #23)

0.088  2014-05-11 17:15
- add 'Testing with Perl::Critic' section to release README
- (Perl::Critic) unpack @_ in CELL.pm
- (Perl::Critic) use @ARGV with 'local' in Test.pm
- Log.pm: remember $ident and re-use it when necessary
- Message.pm: add 'error' attribute to message class, add 'stringify'
  method to message class revamp error checking in 'new'

Changes  view on Meta::CPAN

- Config.pm: fix bug "get_param_meta has same problem where $meta could be used to
  access $site variables"
- t/070-config.pm: add test case for this bug

0.201  2014-11-05 14:58 CET
- remove dependency on Data::Structure::Util, which does not work with perl
  5.20

0.202  2014-11-28 17:50 CET
- Status.pm: since 'dclone' might die (e.g., when a siteparam contains a REGEXP
  literal), put the dclone call in a Try::Tiny block

0.203  2014-12-23 15:38 CET
- add (CELL) prefix to more App::CELL-internal log messages

0.204  2014-12-23 18:38 CET
- Config.pm: do not concatenate a variable whose value might be undef

0.205  2015-01-13 23:29 CET
- Config.pm: add 'exists' method; add 'get' wrapper for 'get_param'
- t/: add rudimentary test of 'exists' method

META.json  view on Meta::CPAN

      "build" : {
         "requires" : {
            "File::ShareDir::Install" : "0.11",
            "File::Spec" : "0",
            "File::Temp" : "0",
            "Log::Any::Test" : "0",
            "Params::Validate" : "0",
            "Test::More" : "0",
            "Test::Output" : "0",
            "Test::Warnings" : "0",
            "Try::Tiny" : "0"
         }
      },
      "configure" : {
         "requires" : {
            "File::ShareDir::Install" : "0.11",
            "Module::Build" : "0",
            "Software::License" : "0"
         }
      },
      "runtime" : {
         "requires" : {
            "Date::Format" : "0",
            "File::HomeDir" : "0",
            "File::Next" : "0",
            "File::ShareDir" : "1",
            "Log::Any" : "0",
            "Log::Any::Adapter" : "0.1",
            "Params::Validate" : "0",
            "Try::Tiny" : "0",
            "perl" : "5.012"
         }
      }
   },
   "provides" : {
      "App::CELL" : {
         "file" : "lib/App/CELL.pm",
         "version" : "0.231"
      },
      "App::CELL::Config" : {

META.yml  view on Meta::CPAN

  - 'Smithfarm <presnypreklad@gmail.com>'
build_requires:
  File::ShareDir::Install: '0.11'
  File::Spec: '0'
  File::Temp: '0'
  Log::Any::Test: '0'
  Params::Validate: '0'
  Test::More: '0'
  Test::Output: '0'
  Test::Warnings: '0'
  Try::Tiny: '0'
configure_requires:
  File::ShareDir::Install: '0.11'
  Module::Build: '0'
  Software::License: '0'
dynamic_config: 1
generated_by: 'Module::Build version 0.4224, CPAN::Meta::Converter version 2.150010'
license: bsd
meta-spec:
  url: http://module-build.sourceforge.net/META-spec-v1.4.html
  version: '1.4'

META.yml  view on Meta::CPAN

  App::CELL::Util:
    file: lib/App/CELL/Util.pm
requires:
  Date::Format: '0'
  File::HomeDir: '0'
  File::Next: '0'
  File::ShareDir: '1'
  Log::Any: '0'
  Log::Any::Adapter: '0.1'
  Params::Validate: '0'
  Try::Tiny: '0'
  perl: '5.012'
resources:
  bugtracker: https://github.com/smithfarm/cell/issues
  license: http://opensource.org/licenses/bsd-license.php
  repository: https://github.com/smithfarm/cell
version: '0.231'
x_serialization_backend: 'CPAN::Meta::YAML version 0.018'

lib/App/CELL/Load.pm  view on Meta::CPAN

    # but in this routine I have no easy way of telling one from the other
    $log->debug( "Loading =>$ARGS{'File'}<=", cell => 1 );
    if ( not ref( $ARGS{'Dest'} ) ) {
        $log->warn(
            "Something strange happened: destination is not a reference?!?",
            cell => 1,
        );
    }

    {
        use Try::Tiny;
        try {
            local *set = sub(@) {
                my $number_of_params = scalar @_;
                my @params = @_;
                my $param;
                my $value;
                if ( $number_of_params == 0 ) {
                    my $msg = "set() called with no parameters";
                    $log->crit( $msg, cell => 1 );
                    die $msg;

lib/App/CELL/Message.pm  view on Meta::CPAN


package App::CELL::Message;

use strict;
use warnings;
use 5.012;

use App::CELL::Log qw( $log );
use App::CELL::Util qw( stringify_args );
use Data::Dumper;
use Try::Tiny;


=head1 NAME

App::CELL::Message - handle messages the user might see



=head1 SYNOPSIS

lib/App/CELL/Status.pm  view on Meta::CPAN

use strict;
use warnings;
use 5.012;

use App::CELL::Log qw( $log );
use App::CELL::Util qw( stringify_args );
use Data::Dumper;
use Params::Validate qw( :all );
use Storable qw( dclone );
use Scalar::Util qw( blessed );
use Try::Tiny;



=head1 NAME

App::CELL::Status - class for return value objects



=head1 SYNOPSIS

lib/App/CELL/Test.pm  view on Meta::CPAN

=head2 mktmpdir

Creates the App::CELL testing directory in a temporary directory
(obtained using L<File::Temp>) and returns the path to this directory in
the payload of a status object.

=cut

sub mktmpdir {

    use Try::Tiny;

    try { 
        use File::Temp;
        $tdo = File::Temp->newdir();
    }
    catch {
        my $errmsg = $_ || '';
        $errmsg =~ s/\n//g;
        $errmsg =~ s/\012/ -- /g;
        return App::CELL::Status->new( level => 'ERR',

lib/App/CELL/Test.pm  view on Meta::CPAN


=head2 touch_files

"Touch" some files. Takes: directory path and list of files to "touch" in
that directory. Returns number of files successfully touched.

=cut

sub touch_files { 
    my ( $dirspec, @file_list ) = @_;
    use Try::Tiny;

    my $count = @file_list;
    try {
        foreach my $file ( map { File::Spec->catfile( $dirspec, $_ ); } @file_list ) {
            _touch( $file );
        }
    }
    catch {
        my $errmsg = $_;
        $errmsg =~ s/\n//g;

t/000-dependencies.t  view on Meta::CPAN

    use_ok( 'Test::More' );

    # non-core (CPAN) modules
    use_ok( 'Date::Format' );
    use_ok( 'File::HomeDir' );
    use_ok( 'File::Next' );
    use_ok( 'File::ShareDir' );
    use_ok( 'Log::Any' );
    use_ok( 'Log::Any::Adapter' );
    use_ok( 'Log::Any::Test' );
    use_ok( 'Try::Tiny' );

    # modules in this distro
    use_ok( 'App::CELL', qw( $CELL $log $meta $core $site ) );
    use_ok( 'App::CELL::Config', qw( $meta $core $site ) );
    use_ok( 'App::CELL::Load' );
    use_ok( 'App::CELL::Log', qw( $log ) );
    use_ok( 'App::CELL::Message' );
    use_ok( 'App::CELL::Status' );
    use_ok( 'App::CELL::Util', qw( utc_timestamp is_directory_viable ) );
    use_ok( 'App::CELL::Test' );



( run in 1.110 second using v1.01-cache-2.11-cpan-05444aca049 )