in reply to Re^3: Should I upload it on CPAN?
in thread Should I upload it on CPAN?

Let's see.

2 modules; 2 namespaces; and two hundred and eighty eight support modules:

ActivePerl::Config ActiveState::Path 1.01 aliased 0.30 AutoLoader 5.70 B 1.22 B::Hooks::EndOfScope 0.08 B::Hooks::OP::Check 0.18 base 2.14 Carp 1.11 Carp::Clan 6.04 Carp::Heavy Class::Load 0.18 Class::Load::XS 0.04 Class::MOP 2.0402 Class::MOP::Attribute 2.0402 Class::MOP::Class 2.0402 Class::MOP::Class::Immutable::Trait 2.0402 Class::MOP::Deprecated 2.0402 Class::MOP::Instance 2.0402 Class::MOP::Method 2.0402 Class::MOP::Method::Accessor 2.0402 Class::MOP::Method::Constructor 2.0402 Class::MOP::Method::Generated 2.0402 Class::MOP::Method::Inlined 2.0402 Class::MOP::Method::Meta 2.0402 Class::MOP::Method::Wrapped 2.0402 Class::MOP::MiniTrait 2.0402 Class::MOP::Mixin 2.0402 Class::MOP::Mixin::AttributeCore 2.0402 Class::MOP::Mixin::HasAttributes 2.0402 Class::MOP::Mixin::HasMethods 2.0402 Class::MOP::Module 2.0402 Class::MOP::Object 2.0402 Class::MOP::Package 2.0402 Clone 0.31 Config Config_git.pl Config_heavy.pl constant 1.19 Context::Preserve 0.01 Cwd 3.29 Data::OptList 0.107 Devel::Declare 0.006000 Devel::Declare::Context::Simple Devel::GlobalDestruction 0.02 Devel::ModList Devel::PartialDump 0.15 Digest::base 1.16 Digest::MD5 2.39 DynaLoader 1.10 Eval::Closure 0.08 Exporter 5.63 Exporter::Heavy 5.63 feature 1.13 File::Basename 2.77 if 0.0401 IO::String 1.08 List::MoreUtils 0.33 List::Util 1.23 metaclass 2.0402 Module::Implementation 0.05 Module::Runtime 0.013 Moose 2.0402 Moose::Deprecated 2.0402 Moose::Error::Default 2.0402 Moose::Error::Util Moose::Exporter 2.0402 Moose::Meta::Attribute 2.0402 Moose::Meta::Attribute::Native 2.0402 Moose::Meta::Attribute::Native::Trait 2.0402 Moose::Meta::Attribute::Native::Trait::Array 2.0402 Moose::Meta::Class 2.0402 Moose::Meta::Class::Immutable::Trait 2.0402 Moose::Meta::Instance 2.0402 Moose::Meta::Method 2.0402 Moose::Meta::Method::Accessor 2.0402 Moose::Meta::Method::Accessor::Native 2.0402 Moose::Meta::Method::Accessor::Native::Array 2.0402 Moose::Meta::Method::Accessor::Native::Array::push 2.0402 Moose::Meta::Method::Accessor::Native::Array::unshift 2.0402 Moose::Meta::Method::Accessor::Native::Array::Writer 2.0402 Moose::Meta::Method::Accessor::Native::Collection 2.0402 Moose::Meta::Method::Accessor::Native::Writer 2.0402 Moose::Meta::Method::Augmented 2.0402 Moose::Meta::Method::Constructor 2.0402 Moose::Meta::Method::Delegation 2.0402 Moose::Meta::Method::Destructor 2.0402 Moose::Meta::Method::Meta 2.0402 Moose::Meta::Method::Overridden 2.0402 Moose::Meta::Mixin::AttributeCore 2.0402 Moose::Meta::Object::Trait 2.0402 Moose::Meta::Role 2.0402 Moose::Meta::Role::Application 2.0402 Moose::Meta::Role::Application::RoleSummation 2.0402 Moose::Meta::Role::Application::ToClass 2.0402 Moose::Meta::Role::Application::ToInstance 2.0402 Moose::Meta::Role::Application::ToRole 2.0402 Moose::Meta::Role::Attribute 2.0402 Moose::Meta::Role::Composite 2.0402 Moose::Meta::Role::Method 2.0402 Moose::Meta::Role::Method::Conflicting 2.0402 Moose::Meta::Role::Method::Required 2.0402 Moose::Meta::TypeCoercion 2.0402 Moose::Meta::TypeCoercion::Union 2.0402 Moose::Meta::TypeConstraint 2.0402 Moose::Meta::TypeConstraint::Class 2.0402 Moose::Meta::TypeConstraint::DuckType 2.0402 Moose::Meta::TypeConstraint::Enum 2.0402 Moose::Meta::TypeConstraint::Parameterizable 2.0402 Moose::Meta::TypeConstraint::Parameterized 2.0402 Moose::Meta::TypeConstraint::Registry 2.0402 Moose::Meta::TypeConstraint::Role 2.0402 Moose::Meta::TypeConstraint::Union 2.0402 Moose::Object 2.0402 Moose::Role 2.0402 Moose::Util 2.0402 Moose::Util::MetaRole 2.0402 Moose::Util::TypeConstraints 2.0402 Moose::Util::TypeConstraints::Builtins 2.0402 MooseX::Declare 0.35 MooseX::Declare::Context 0.35 MooseX::Declare::Context::Namespaced 0.35 MooseX::Declare::Context::Parameterized 0.35 MooseX::Declare::Context::WithOptions 0.35 MooseX::Declare::StackItem 0.35 MooseX::Declare::Syntax::EmptyBlockIfMissing 0.35 MooseX::Declare::Syntax::Extending 0.35 MooseX::Declare::Syntax::InnerSyntaxHandling 0.35 MooseX::Declare::Syntax::Keyword::Class 0.35 MooseX::Declare::Syntax::Keyword::Clean 0.35 MooseX::Declare::Syntax::Keyword::Method 0.35 MooseX::Declare::Syntax::Keyword::MethodModifier 0.35 MooseX::Declare::Syntax::Keyword::Namespace 0.35 MooseX::Declare::Syntax::Keyword::Role 0.35 MooseX::Declare::Syntax::Keyword::With 0.35 MooseX::Declare::Syntax::KeywordHandling 0.35 MooseX::Declare::Syntax::MethodDeclaration 0.35 MooseX::Declare::Syntax::MethodDeclaration::Parameterized 0.35 MooseX::Declare::Syntax::MooseSetup 0.35 MooseX::Declare::Syntax::NamespaceHandling 0.35 MooseX::Declare::Syntax::OptionHandling 0.35 MooseX::Declare::Syntax::RoleApplication 0.35 MooseX::Declare::Util 0.35 MooseX::LazyRequire 0.07 MooseX::LazyRequire::Meta::Attribute::Trait::LazyRequire 0.07 MooseX::Meta::TypeCoercion::Structured MooseX::Meta::TypeCoercion::Structured::Optional MooseX::Meta::TypeConstraint::ForceCoercion 0.01 MooseX::Meta::TypeConstraint::Structured MooseX::Meta::TypeConstraint::Structured::Optional MooseX::Method::Signatures 0.37 MooseX::Method::Signatures::Meta::Method 0.37 MooseX::Method::Signatures::Types 0.37 MooseX::Role::Parameterized 1.00 MooseX::Role::Parameterized::Meta::Role::Parameterizable 0.27 MooseX::Role::Parameterized::Meta::Role::Parameterized 0.27 MooseX::Role::Parameterized::Meta::Trait::Parameterized 0.27 MooseX::Role::Parameterized::Parameters 0.27 MooseX::Types 0.31 MooseX::Types::Base 0.31 MooseX::Types::CheckedUtilExports 0.31 MooseX::Types::Moose 0.31 MooseX::Types::Structured 0.21 MooseX::Types::Structured::OverflowHandler MooseX::Types::TypeDecorator 0.31 MooseX::Types::UndefinedType 0.31 MooseX::Types::Util 0.31 mro 1.01 MRO::Compat 0.10 namespace::autoclean 0.13 namespace::clean 0.20 overload 1.07 Package::DeprecationManager 0.11 Package::Stash 0.33 Package::Stash::XS 0.25 Params::Util 1.04 parent 0.223 Parse::Method::Signatures 1.003014 Parse::Method::Signatures::Param::Named Parse::Method::Signatures::Param::Placeholder Parse::Method::Signatures::ParamCollection Parse::Method::Signatures::TypeConstraint Parse::Method::Signatures::Types PPI 1.215 PPI::Document 1.215 PPI::Document::File 1.215 PPI::Document::Fragment 1.215 PPI::Document::Normalized 1.215 PPI::Element 1.215 PPI::Exception 1.215 PPI::Exception::ParserRejection 1.215 PPI::Exception::ParserTimeout 1.215 PPI::Lexer 1.215 PPI::Node 1.215 PPI::Normal 1.215 PPI::Normal::Standard 1.215 PPI::Statement 1.215 PPI::Statement::Break 1.215 PPI::Statement::Compound 1.215 PPI::Statement::Data 1.215 PPI::Statement::End 1.215 PPI::Statement::Expression 1.215 PPI::Statement::Given 1.215 PPI::Statement::Include 1.215 PPI::Statement::Include::Perl6 1.215 PPI::Statement::Null 1.215 PPI::Statement::Package 1.215 PPI::Statement::Scheduled 1.215 PPI::Statement::Sub 1.215 PPI::Statement::Unknown 1.215 PPI::Statement::UnmatchedBrace 1.215 PPI::Statement::Variable 1.215 PPI::Statement::When 1.215 PPI::Structure 1.215 PPI::Structure::Block 1.215 PPI::Structure::Condition 1.215 PPI::Structure::Constructor 1.215 PPI::Structure::For 1.215 PPI::Structure::Given 1.215 PPI::Structure::List 1.215 PPI::Structure::Subscript 1.215 PPI::Structure::Unknown 1.215 PPI::Structure::When 1.215 PPI::Token 1.215 PPI::Token::_QuoteEngine 1.215 PPI::Token::_QuoteEngine::Full 1.215 PPI::Token::_QuoteEngine::Simple 1.215 PPI::Token::ArrayIndex 1.215 PPI::Token::Attribute 1.215 PPI::Token::BOM 1.215 PPI::Token::Cast 1.215 PPI::Token::Comment 1.215 PPI::Token::DashedWord 1.215 PPI::Token::Data 1.215 PPI::Token::End 1.215 PPI::Token::HereDoc 1.215 PPI::Token::Label 1.215 PPI::Token::Magic 1.215 PPI::Token::Number 1.215 PPI::Token::Number::Binary 1.215 PPI::Token::Number::Exp 1.215 PPI::Token::Number::Float 1.215 PPI::Token::Number::Hex 1.215 PPI::Token::Number::Octal 1.215 PPI::Token::Number::Version 1.215 PPI::Token::Operator 1.215 PPI::Token::Pod 1.215 PPI::Token::Prototype 1.215 PPI::Token::Quote 1.215 PPI::Token::Quote::Double 1.215 PPI::Token::Quote::Interpolate 1.215 PPI::Token::Quote::Literal 1.215 PPI::Token::Quote::Single 1.215 PPI::Token::QuoteLike 1.215 PPI::Token::QuoteLike::Backtick 1.215 PPI::Token::QuoteLike::Command 1.215 PPI::Token::QuoteLike::Readline 1.215 PPI::Token::QuoteLike::Regexp 1.215 PPI::Token::QuoteLike::Words 1.215 PPI::Token::Regexp 1.215 PPI::Token::Regexp::Match 1.215 PPI::Token::Regexp::Substitute 1.215 PPI::Token::Regexp::Transliterate 1.215 PPI::Token::Separator 1.215 PPI::Token::Structure 1.215 PPI::Token::Symbol 1.215 PPI::Token::Unknown 1.215 PPI::Token::Whitespace 1.215 PPI::Token::Word 1.215 PPI::Tokenizer 1.215 PPI::Util 1.215 re 0.09 Scalar::Util 1.23 SelfLoader 1.17 Sub::Exporter 0.982 Sub::Identify 0.04 Sub::Install 0.925 Sub::Name 0.05 Symbol 1.07 Text::Balanced 2.02 Try::Tiny 0.09 utf8 1.07 utf8_heavy.pl Variable::Magic 0.41 vars 1.01 warnings 1.06 warnings::register 1.01 XSLoader 0.10

To create a 3 line script that downloads 2 files, constructs a single object and calls a single method upon it -- Ie. Calls one function passing some parameters.

And when it goes wrong, no one knows how to fix it. If that's modern Perl, you can keep it.

Isn't it amazing how technology is giving us ever more powerful ways of creating unbelievable (and unintelligible) complexity from simplicity.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.

The start of some sanity?

Replies are listed 'Best First'.
Re^5: Should I upload it on CPAN?
by chromatic (Archbishop) on Feb 24, 2012 at 18:10 UTC
    Isn't it amazing how technology is giving us ever more powerful ways of creating unbelievable (and unintelligible) complexity from simplicity.

    The same twelve tone western scale that allows Handel's music for the royalfireworks, Beethoven's symphonies, and Mozart also allows autotuned and sampled radio pop performed by talentless hacks. You can (rightly) decry the latter without diminishing the former.

    Then again, Liszt would have fit right into the LA party scene.

      That is a studiously osbcure retort, but an interesting analogy none the less.

      When some techo-hack scratches The Crazy Frog together with a jazz-rap fusion that sampled a movie soundtrack that had a Country&Western band playing Ballade No.2 in B minor on an autoharp and slide guitar, no one has to go back and try to debug Liszt's original score.

        ... no one has to go back and try to debug Liszt's original score.

        A fair point: there's a craft to programming, one which becomes more obvious when someone has to maintain that code. No one has to figure out the dominant tonality of Tristan und Isolde.

        Then again, the nice part of working in a craft—especially one both malleable and empirical as programming—is that you can turn something from a spectacular mess into something maintainable.

Re^5: Should I upload it on CPAN?
by tobyink (Canon) on Feb 25, 2012 at 00:01 UTC

    I'm not entirely sure what your point is.

    # lib/App/Apache/Wrapper.pm { package App::Apache::Wrapper; use Moose; has 'apache_path' => ( is => 'ro', isa => 'Str', ); sub run { my $self = shift; system($self->apache_path); } } # apache.pl use App::Apache::Wrapper; App::Apache::Wrapper -> new(apache_path => '/usr/sbin/httpd') -> run;

    The fact that a program consists of instantiating a single object and calling a single method on it, is not necessarily an indication of the complexity of the program as a whole.

    Yes, it's frustrating that App::Reprove has not worked for that person. On the whole its test results are reasonably good (about 90% pass) though there's room for improvement. I'm sure that by dropping MooseX::Declare (which is still pretty experimental) I could push that up to pretty close to 100%. But I have no immediate plans to do that. Maintaining Module::Reprove is not my main priority in life. Patches welcome though.

      Maintaining Module::Reprove is not my main priority in life. Patches welcome though.

      Here is patch for you ;)

      $ cat reprove.pl #!/usr/bin/perl -- system $^X, qw/ -S cpanp t/, @ARGV;

      scriptdist reprove.pl
      cd reprove.pl.d
      perl Makefile.PL
      make dist
      cpanupload reprove.pl-0.10.tar.gz

      The fact that a program consists of instantiating a single object and calling a single method on it, is not necessarily an indication of the complexity of the program as a whole.

      Sorry, but that is simply fatuous pseud-OO.

      You pull in nearly 300 modules to do nothing more than: system '/usr/sbin/httpd';

      That's not just fatuous, it is moronic.

      I truly hope that doesn't offend you, because that is not my intention -- all said and done, it is just the opinion of some obscure Englishman on the net -- but it is my opinion.

      You are gaining exactly nothing from your use of OO here; and exactly nothing from your dependency on, and the considerable overheads of, Moose.

      It's not even validating your parameter for you. It will happily accept 1234567890 as a string -- as all Perl will.

      If App::Reprove consisted of (something like):

      package App::Reprove; use App::Prove; use LWP::Simpe; require Exporter; our @ISA = qw[ Exporter ]; our @EXPORT = qw[ doit ]; sub doit { my %arg = @_; ## maybe a little validation my $file1 = get delete $args{ file1 }; my $file2 = get delete $args{ file2 }; ## do whatver you do with the file contents... App::Prove->new( %args )->run } 1;

      It would:

      • be just as useful;
      • not require 300MB of downloads;
      • (probably) work everywhere;
      • (probably) never need maintenance;
      • be easy to understand, debug, and patch should that ever be required.

        By any semi-competent perl (or C or D or Ruby or Java or Python or maybe even PHP) programmer, anywhere.

      As is, you've got a module that requires users to install a huge crap-load of dependencies only to find -- for 10% of them at least -- that it doesn't work. And probably never will unless 1 or more of the 3 or 4 guys that understand what the **** is going on inside Moose decide to step in and help you out.

      I'm pretty damn good at working my way through new modules and working out what is wrong, but with Moose in the picture, I can't even get started.

      Quite frankly, I cannot see any merit in your module over using App::Prove myself. But then, I can see no merit in App::Prove over using the prove command directly either. But at least I can look inside the latter and see the value-add -- no matter how tenuous I might think it is -- and can understand the code enough that I could fix any problems that arose. With yours, NADA. Not a hope in hell.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

      The start of some sanity?

        Ignoring the rest of your rant, but ...

        And probably never will unless 1 or more of the 3 or 4 guys that understand what the **** is going on inside Moose decide to step in and help you out.

        s/Moose/Perl Core/g

        Moose is an abstraction, just like Perl is an abstraction. By your logic, we should all just be writing in binary, and assembler is for people who don't understand 1 and 0s.

        -stvn

        Sorry, but that is simply fatuous pseud-OO.

        You pull in nearly 300 modules to do nothing more than: system '/usr/sbin/httpd';

        Well yes, but my point is that a single object instantiation and method call can be something trivial - e.g. adding two numbers...

        perl -MMath::BigInt -E'say Math::BigInt->new(400)->badd(2)'

        (400's big enough to justify Math::BigInt, right?) ... or something complex - e.g. serving HTTP. (If you don't like the Apache example, then pure Perl Web servers such as Starman are usually not much more than an instantiation plus method call.)

        Quite frankly, I cannot see any merit in your module over using App::Prove myself.

        App::Reprove does a different task. App::Prove runs one or more test cases that are on the local disk. App::Reprove takes the name of an already installed module, finds its test cases on CPAN, downloads them into a temp dir and runs App::Prove on them.

        But then, I can see no merit in App::Prove over using the prove command directly either.

        [tai@miranda (pts/2) ~]$ cat `which prove` | head -n 13 #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; #!/usr/bin/perl -w use strict; use App::Prove; my $app = App::Prove->new; $app->process_args(@ARGV); exit( $app->run ? 0 : 1 ); __END__