Discussion:
[rt.cpan.org #101569] Incorrect module parsing if Moose is included
(too old to reply)
via RT
2015-01-16 04:59:56 UTC
Permalink
Thu Jan 15 23:59:55 2015: Request 101569 was acted upon.
Transaction: Ticket created by ***@skipfault.com
Queue: Module-ScanDeps
Subject: Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >


I'm attempting to use scandeps (and eventually pp) with some code that
requires File::ChangeNotify.
File::ChangeNotify has a dependency of Moose which means whenever scandeps
is run with the "-c" flag Moose is changing sub names, which is causing
scandeps to fail.

Example code attached (code obviously does nothing, but does demonstrate
the problem), output of scandeps, scandeps -c and scandeps -x is as
follows :


scandeps

# Use of runtime loader module Module::Implementation detected. Results
of static scanning may be incomplete.
# Use of runtime loader module Module::Runtime detected. Results of
static scanning may be incomplete.
'AI::Categorizer::Hypothesis'
=> 'undef',
'AI::Categorizer::KnowledgeSet'
=> 'undef',
'Class::Container'
=> '0.12',
'AI::Categorizer::Category'
=> 'undef',
'AI::Categorizer::Document'
=> 'undef',
'AI::Categorizer::Learner'
=> 'undef',
'AI::Categorizer::FeatureVector'
=> 'undef',
'AI::Categorizer::ObjectSet'
=> 'undef',
'AI::Categorizer::Collection'
=> 'undef',
'Params::Validate'
=> '1.17',
'Params::Validate::PP'
=> '1.17',
'Params::Validate::XS'
=> '1.17',
'Params::Validate::Constants'
=> '1.17',
'AI::Categorizer::Util'
=> 'undef',
'AI::Categorizer::Storable'
=> 'undef',
'File::Path'
=> '2.09',
'integer'
=> '1.01',
'Storable'
=> '2.51',
'Algorithm::NaiveBayes::Util'
=> 'undef',
'base'
=> '2.22',
'Algorithm::NaiveBayes'
=> '0.04',
'List::Util'
=> '1.41',
'B::Hooks::EndOfScope::PP::FieldHash'
=> 'undef',
'B::Hooks::EndOfScope::PP::HintHash'
=> 'undef',
'Hash::Util::FieldHash'
=> '1.15',
'Variable::Magic'
=> '0.55',
'Sub::Exporter::Progressive'
=> '0.001011',
'File::Glob'
=> '1.23',
'B::Deparse'
=> '1.26',
'Module::Runtime'
=> '0.014',
'Try::Tiny'
=> '0.22',
'namespace::clean'
=> '0.25',
'Data::OptList'
=> '0.109',
'Module::Implementation'
=> '0.09',
'Package::Stash'
=> '0.37',
'Package::Stash::PP'
=> '0.37',
'Package::Stash::XS'
=> '0.28',
'Devel::OverloadInfo'
=> '0.002',
'Params::Util'
=> '1.07',
'Sub::Install'
=> '0.928',
'PadWalker'
=> '2.0',
'Devel::Caller'
=> '2.06',
'Carp::Heavy'
=> '1.3301',
'Class::Tiny'
=> '1.000',
'Devel::StackTrace::Frame'
=> '2.00',
'Devel::LexAlias'
=> '0.05',
'Exporter::Heavy'
=> '5.71',
'XSLoader'
=> '0.17',
'File::ChangeNotify::Watcher::Default'
=> '0.24',
'Module::Pluggable::Object'
=> '5.1',
'Class::Load'
=> '0.22',
'Class::Load::PP'
=> '0.22',
'MooseX::SemiAffordanceAccessor'
=> '0.10',
'Time::HiRes'
=> '1.9726',
'namespace::autoclean'
=> '0.24',
'Moose::Meta::Attribute::Native'
=> '2.1403',
'Moose::Meta::Instance'
=> '2.1403',
'Moose::Meta::Role::Application::RoleSummation'
=> '2.1403',
'Moose::Meta::Role::Application::ToClass'
=> '2.1403',
'Moose::Meta::Role::Application::ToInstance'
=> '2.1403',
'Moose::Meta::Role::Application::ToRole'
=> '2.1403',
'Moose::Object'
=> '2.1403',
'Moose::Deprecated'
=> '2.1403',
'Moose::Util::TypeConstraints'
=> '2.1403',
'Moose::Meta::Role::Composite'
=> '2.1403',
'Moose::Meta::Role::Application'
=> '2.1403',
'Moose::Meta::Role'
=> '2.1403',
'Moose::Meta::Attribute'
=> '2.1403',
'Moose::Meta::TypeCoercion'
=> '2.1403',
'Moose::Meta::TypeConstraint'
=> '2.1403',
'Moose::Exporter'
=> '2.1403',
'Moose::Exception::CannotCoerceAttributeWhichHasNoCoercion'
=> '2.1403',
'Moose::Exception::AttributeConflictInSummation'
=> '2.1403',
'Moose::Exception::AttributeIsRequired'
=> '2.1403',
'Moose::Exception::AutoDeRefNeedsArrayRefOrHashRef'
=> '2.1403',
'Moose::Exception::BuilderMethodNotSupportedForInlineAttribute'
=> '2.1403',
'Moose::Exception::CanExtendOnlyClasses'
=> '2.1403',
'Moose::Exception::CannotAssignValueToReadOnlyAccessor'
=> '2.1403',
'Moose::Role'
=> '2.1403',
'Moose::Exception::CannotAutoDereferenceTypeConstraint'
=> '2.1403',
'Moose::Exception::CannotCallAnAbstractBaseMethod'
=> '2.1403',
'Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresentInClass'
=> '2.1403',
'Moose::Exception::CannotFindDelegateMetaclass'
=> '2.1403',
'Moose::Exception::CannotFindTypeGivenToMatchOnType'
=> '2.1403',
'Moose::Exception::CannotLocatePackageInINC'
=> '2.1403',
'Moose::Exception::CannotOverrideALocalMethod'
=> '2.1403',
'Moose::Exception::CannotOverrideNoSuperMethod'
=> '2.1403',
'Moose::Exception::CannotOverrideLocalMethodIsPresent'
=> '2.1403',
'Moose::Exception::CannotUseLazyBuildAndDefaultSimultaneously'
=> '2.1403',
'Moose::Exception::CanReblessOnlyIntoASuperclass'
=> '2.1403',
'Moose::Exception::ClassDoesNotHaveInitMeta'
=> '2.1403',
'Moose::Exception::CoercionAlreadyExists'
=> '2.1403',
'Moose::Exception::ConstructClassInstanceTakesPackageName'
=> '2.1403',
'Moose::Exception::CouldNotEvalConstructor'
=> '2.1403',
'Moose::Exception::CouldNotParseType'
=> '2.1403',
'Moose::Exception::CreateMOPClassTakesHashRefOfMethods'
=> '2.1403',
'Moose::Exception::CreateTakesHashRefOfAttributes'
=> '2.1403',
'Moose::Exception::DelegationToAClassWhichIsNotLoaded'
=> '2.1403',
'Moose::Exception::EnumCalledWithAnArrayRefAndAdditionalArgs'
=> '2.1403',
'Moose::Exception::IllegalInheritedOptions'
=> '2.1403',
'Moose::Exception::InitializeTakesUnBlessedPackageName'
=> '2.1403',
'Moose::Exception::InvalidArgPassedToMooseUtilMetaRole'
=> '2.1403',
'Moose::Exception::InvalidBaseTypeGivenToCreateParameterizedTypeConstraint'
=> '2.1403',
'Moose::Exception::InvalidArgumentsToTraitAliases'
=> '2.1403',
'Moose::Exception::InvalidTypeConstraint'
=> '2.1403',
'Moose::Exception::IsaDoesNotDoTheRole'
=> '2.1403',
'Moose::Exception::MetaclassIsARoleNotASubclassOfGivenMetaclass'
=> '2.1403',
'Moose::Exception::MetaclassMustBeDerivedFromClassMOPClass'
=> '2.1403',
'Moose::Exception::MethodExpectsFewerArgs'
=> '2.1403',
'Moose::Exception::MethodModifierNeedsMethodName'
=> '2.1403',
'Moose::Exception::MethodNameNotFoundInInheritanceHierarchy'
=> '2.1403',
'Moose::Exception::MustDefineAnOverloadOperator'
=> '2.1403',
'Moose::Exception::MustPassEvenNumberOfArguments'
=> '2.1403',
'Moose::Exception::MustSpecifyAtleastOneMethod'
=> '2.1403',
'Moose::Exception::MustSupplyAMooseMetaAttributeInstance'
=> '2.1403',
'Moose::Exception::NeitherAttributeNorAttributeNameIsGiven'
=> '2.1403',
'Moose::Exception::NeitherTypeNorTypeNameIsGiven'
=> '2.1403',
'Moose::Exception::NoCasesMatched'
=> '2.1403',
'Moose::Exception::NoDestructorClassSpecified'
=> '2.1403',
'Moose::Exception::OnlyInstancesCanBeCloned'
=> '2.1403',
'Moose::Exception::OverloadRequiresAMethodNameOrCoderef'
=> '2.1403',
'Moose::Exception::OverrideConflictInComposition'
=> '2.1403',
'Moose::Exception::PackagesAndModulesAreNotCachable'
=> '2.1403',
'Moose::Exception::RolesDoNotSupportAugment'
=> '2.1403',
'Moose::Exception::RolesDoNotSupportInner'
=> '2.1403',
'Moose::Exception::TypeConstraintIsAlreadyCreated'
=> '2.1403',
'Moose::Exception::UnableToCanonicalizeNonRolePackage'
=> '2.1403',
'Moose::Exception::UndefinedHashKeysPassedToMethod'
=> '2.1403',
'Moose::Exception::ValidationFailedForTypeConstraint'
=> '2.1403',
'Moose::Exception::WrongTypeConstraintGiven'
=> '2.1403',
'Moose'
=> '2.1403',
'Moose::Conflicts'
=> 'undef',
'Moose::Exception::Role::Attribute'
=> '2.1403',
'Moose::Exception::Role::AttributeName'
=> '2.1403',
'Moose::Exception::Role::Class'
=> '2.1403',
'Moose::Exception::Role::EitherAttributeOrAttributeName'
=> '2.1403',
'Moose::Exception::Role::Instance'
=> '2.1403',
'Moose::Exception::Role::InstanceClass'
=> '2.1403',
'Moose::Exception::Role::InvalidAttributeOptions'
=> '2.1403',
'Moose::Exception::Role::Method'
=> '2.1403',
'Moose::Exception::Role::ParamsHash'
=> '2.1403',
'Moose::Exception::Role::Role'
=> '2.1403',
'Moose::Exception::Role::RoleForCreate'
=> '2.1403',
'Moose::Exception::Role::RoleForCreateMOPClass'
=> '2.1403',
'Moose::Exception::Role::TypeConstraint'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::Array'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::Bool'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::Code'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::Counter'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::Hash'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::Number'
=> '2.1403',
'Moose::Meta::Attribute::Native::Trait::String'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::Writer'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::accessor'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::clear'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::count'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::delete'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::elements'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::first'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::first_index'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::get'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::grep'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::insert'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::is_empty'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::join'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::map'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::natatime'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::pop'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::push'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::reduce'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::set'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::shallow_clone'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::shift'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::shuffle'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::sort'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::sort_in_place'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::splice'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::uniq'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Array::unshift'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Bool::not'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Bool::set'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Bool::toggle'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Bool::unset'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Code::execute'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Code::execute_method'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Collection'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Counter::Writer'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Counter::dec'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Counter::inc'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Counter::reset'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Counter::set'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::Writer'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::accessor'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::clear'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::count'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::defined'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::delete'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::elements'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::exists'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::get'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::is_empty'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::keys'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::kv'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::set'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::shallow_clone'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Hash::values'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::abs'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::add'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::div'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::mod'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::mul'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::set'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Number::sub'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Reader'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::append'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::chomp'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::chop'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::clear'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::inc'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::length'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::match'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::prepend'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::replace'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::String::substr'
=> '2.1403',
'Moose::Meta::Method::Accessor::Native::Writer'
=> '2.1403',
'Moose::Meta::Object::Trait'
=> '2.1403',
'Class::MOP::Deprecated'
=> '2.1403',
'Class::MOP::Mixin::HasAttributes'
=> '2.1403',
'Class::MOP::Mixin::HasMethods'
=> '2.1403',
'Class::MOP::Mixin::HasOverloads'
=> '2.1403',
'Class::MOP::Method::Constructor'
=> '2.1403',
'Class::MOP::Method::Wrapped'
=> '2.1403',
'Class::MOP::Method::Accessor'
=> '2.1403',
'Class::MOP::Method::Generated'
=> '2.1403',
'Class::MOP::Method::Inlined'
=> '2.1403',
'Class::MOP::Method::Meta'
=> '2.1403',
'Class::MOP::Overload'
=> '2.1403',
'Class::MOP::Package'
=> '2.1403',
'Class::MOP::Mixin'
=> '2.1403',
'Moose::Meta::Method::Accessor'
=> '2.1403',
'Moose::Meta::Method::Delegation'
=> '2.1403',
'Class::MOP::Attribute'
=> '2.1403',
'Class::MOP::MiniTrait'
=> '2.1403',
'Moose::Meta::Mixin::AttributeCore'
=> '2.1403',
'Moose::Meta::Class::Immutable::Trait'
=> '2.1403',
'Moose::Meta::Method::Augmented'
=> '2.1403',
'Moose::Meta::Method::Constructor'
=> '2.1403',
'Moose::Meta::Method::Destructor'
=> '2.1403',
'Moose::Meta::Method::Overridden'
=> '2.1403',
'Class::MOP::Class'
=> '2.1403',
'Moose::Meta::Method::Meta'
=> '2.1403',
'Class::MOP::Class::Immutable::Trait'
=> '2.1403',
'Class::MOP::Instance'
=> '2.1403',
'Class::MOP::Method'
=> '2.1403',
'Moose::Meta::Method'
=> '2.1403',
'Class::MOP::Mixin::AttributeCore'
=> '2.1403',
'Moose::Meta::Role::Attribute'
=> '2.1403',
'Moose::Meta::Role::Method'
=> '2.1403',
'Moose::Meta::Role::Method::Conflicting'
=> '2.1403',
'Class::MOP::Module'
=> '2.1403',
'Moose::Meta::Role::Method::Required'
=> '2.1403',
'Class::MOP::Object'
=> '2.1403',
'Moose::Meta::TypeConstraint::Parameterized'
=> '2.1403',
'Moose::Meta::TypeConstraint::Parameterizable'
=> '2.1403',
'Moose::Meta::TypeCoercion::Union'
=> '2.1403',
'Moose::Meta::TypeConstraint::Class'
=> '2.1403',
'Moose::Meta::TypeConstraint::DuckType'
=> '2.1403',
'Moose::Meta::TypeConstraint::Enum'
=> '2.1403',
'Moose::Meta::TypeConstraint::Registry'
=> '2.1403',
'Moose::Meta::TypeConstraint::Role'
=> '2.1403',
'Moose::Meta::TypeConstraint::Union'
=> '2.1403',
'Moose::Util::TypeConstraints::Builtins'
=> '2.1403',
'Moose::Exception::WrapTakesACodeRefToBless'
=> '2.1403',
'Moose::Exception::ValidationFailedForInlineTypeConstraint'
=> '2.1403',
'Moose::Exception::UnionTakesAtleastTwoTypeNames'
=> '2.1403',
'Moose::Exception::UnionCalledWithAnArrayRefAndAdditionalArgs'
=> '2.1403',
'Moose::Exception::UnableToRecognizeDelegateMetaclass'
=> '2.1403',
'Moose::Exception::UnableToCanonicalizeHandles'
=> '2.1403',
'Moose::Exception::TypeParameterMustBeMooseMetaType'
=> '2.1403',
'Moose::Exception::TypeConstraintCannotBeUsedForAParameterizableType'
=> '2.1403',
'Moose::Exception::TriggerMustBeACodeRef'
=> '2.1403',
'Moose::Exception::SingleParamsToNewMustBeHashRef'
=> '2.1403',
'Moose::Exception::RolesListMustBeInstancesOfMooseMetaRole'
=> '2.1403',
'Moose::Exception::RolesInCreateTakesAnArrayRef'
=> '2.1403',
'Moose::Exception::RolesDoNotSupportRegexReferencesForMethodModifiers'
=> '2.1403',
'Moose::Exception::RolesDoNotSupportExtends'
=> '2.1403',
'Moose::Exception::RoleNameRequiredForMooseMetaRole'
=> '2.1403',
'Moose::Exception::RoleNameRequired'
=> '2.1403',
'Moose::Exception::RoleExclusionConflict'
=> '2.1403',
'Moose::Exception::RoleDoesTheExcludedRole'
=> '2.1403',
'Moose::Exception::RequiredMethodsNotImplementedByClass'
=> '2.1403',
'Moose::Exception::RequiredMethodsImportedByClass'
=> '2.1403',
'Moose::Exception::RequiredAttributeNeedsADefault'
=> '2.1403',
'Moose::Exception::RequiredAttributeLacksInitialization'
=> '2.1403',
'Moose::Exception::ReferencesAreNotAllowedAsDefault'
=> '2.1403',
'Moose::Exception::ParameterIsNotSubtypeOfParent'
=> '2.1403',
'Moose::Exception::PackageNameAndNameParamsNotGivenToWrap'
=> '2.1403',
'Moose::Exception::PackageDoesNotUseMooseExporter'
=> '2.1403',
'Moose::Exception::OverrideConflictInSummation'
=> '2.1403',
'Moose::Exception::OverloadRequiresNamesForCoderef'
=> '2.1403',
'Moose::Exception::OverloadRequiresAnOperator'
=> '2.1403',
'Moose::Exception::OverloadRequiresAMetaOverload'
=> '2.1403',
'Moose::Exception::OverloadRequiresAMetaMethod'
=> '2.1403',
'Moose::Exception::OverloadRequiresAMetaClass'
=> '2.1403',
'Moose::Exception::OverloadConflictInSummation'
=> '2.1403',
'Moose::Exception::OperatorIsRequired'
=> '2.1403',
'Moose::Exception::NoParentGivenToSubtype'
=> '2.1403',
'Moose::Exception::NoImmutableTraitSpecifiedForClass'
=> '2.1403',
'Moose::Exception::NoConstraintCheckForTypeConstraint'
=> '2.1403',
'Moose::Exception::NoBodyToInitializeInAnAbstractBaseClass'
=> '2.1403',
'Moose::Exception::NoAttributeFoundInSuperClass'
=> '2.1403',
'Moose::Exception::NeitherRoleNorRoleNameIsGiven'
=> '2.1403',
'Moose::Exception::NeitherClassNorClassNameIsGiven'
=> '2.1403',
'Moose::Exception::NeedsTypeConstraintUnionForTypeCoercionUnion'
=> '2.1403',
'Moose::Exception::MustSupplyPackageNameAndName'
=> '2.1403',
'Moose::Exception::MustSupplyArrayRefAsCurriedArguments'
=> '2.1403',
'Moose::Exception::MustSupplyAnAttributeToConstructWith'
=> '2.1403',
'Moose::Exception::MustSupplyAnAccessorTypeToConstructWith'
=> '2.1403',
'Moose::Exception::MustSupplyAMetaclass'
=> '2.1403',
'Moose::Exception::MustSupplyADelegateToMethod'
=> '2.1403',
'Moose::Exception::MustSupplyAClassMOPAttributeInstance'
=> '2.1403',
'Moose::Exception::MustSpecifyAtleastOneRoleToApplicant'
=> '2.1403',
'Moose::Exception::MustSpecifyAtleastOneRole'
=> '2.1403',
'Moose::Exception::MustProvideANameForTheAttribute'
=> '2.1403',
'Moose::Exception::MustPassEvenNumberOfAttributeOptions'
=> '2.1403',
'Moose::Exception::MustPassAPackageNameOrAnExistingClassMOPPackageInstance'
=> '2.1403',
'Moose::Exception::MustPassAMooseMetaRoleInstanceOrSubclass'
=> '2.1403',
'Moose::Exception::MustPassAHashOfOptions'
=> '2.1403',
'Moose::Exception::MustHaveAtLeastOneValueToEnumerate'
=> '2.1403',
'Moose::Exception::MustDefineAnAttributeName'
=> '2.1403',
'Moose::Exception::MustDefineAMethodName'
=> '2.1403',
'Moose::Exception::MethodNameNotGiven'
=> '2.1403',
'Moose::Exception::MOPAttributeNewNeedsAttributeName'
=> '2.1403',
'Moose::Exception::MethodNameConflictInRoles'
=> '2.1403',
'Moose::Exception::MethodExpectsMoreArgs'
=> '2.1403',
'Moose::Exception::MethodExpectedAMetaclassObject'
=> '2.1403',
'Moose::Exception::MetaclassTypeIncompatible'
=> '2.1403',
'Moose::Exception::MetaclassNotLoaded'
=> '2.1403',
'Moose::Exception::MetaclassMustBeASubclassOfMooseMetaRole'
=> '2.1403',
'Moose::Exception::MetaclassMustBeASubclassOfMooseMetaClass'
=> '2.1403',
'Moose::Exception::MetaclassIsNotASubclassOfGivenMetaclass'
=> '2.1403',
'Moose::Exception::MetaclassIsAClassNotASubclassOfGivenMetaclass'
=> '2.1403',
'Moose::Exception::MessageParameterMustBeCodeRef'
=> '2.1403',
'Moose::Exception::MatchActionMustBeACodeRef'
=> '2.1403',
'Moose::Exception::Legacy'
=> '2.1403',
'Moose::Exception::LazyAttributeNeedsADefault'
=> '2.1403',
'Moose::Exception::IsaLacksDoesMethod'
=> '2.1403',
'Moose::Exception::InvalidValueForIs'
=> '2.1403',
'Moose::Exception::InvalidTypeGivenToCreateParameterizedTypeConstraint'
=> '2.1403',
'Moose::Exception::InvalidRoleApplication'
=> '2.1403',
'Moose::Exception::InvalidOverloadOperator'
=> '2.1403',
'Moose::Exception::InvalidNameForType'
=> '2.1403',
'Moose::Exception::InvalidHasProvidedInARole'
=> '2.1403',
'Moose::Exception::InvalidHandleValue'
=> '2.1403',
'Moose::Exception::InvalidArgumentToMethod'
=> '2.1403',
'Moose::Exception::InstanceMustBeABlessedReference'
=> '2.1403',
'Moose::Exception::InstanceBlessedIntoWrongClass'
=> '2.1403',
'Moose::Exception::InitMetaRequiresClass'
=> '2.1403',
'Moose::Exception::IncompatibleMetaclassOfSuperclass'
=> '2.1403',
'Moose::Exception::IllegalMethodTypeToAddMethodModifier'
=> '2.1403',
'Moose::Exception::HandlesMustBeAHashRef'
=> '2.1403',
'Moose::Exception::ExtendsMissingArgs'
=> '2.1403',
'Moose::Exception::EnumValuesMustBeString'
=> '2.1403',
'Moose::Exception::DoesRequiresRoleName'
=> '2.1403',
'Moose::Exception::DelegationToATypeWhichIsNotAClass'
=> '2.1403',
'Moose::Exception::DelegationToARoleWhichIsNotLoaded'
=> '2.1403',
'Moose::Exception::DefaultToMatchOnTypeMustBeCodeRef'
=> '2.1403',
'Moose::Exception::CreateTakesHashRefOfMethods'
=> '2.1403',
'Moose::Exception::CreateTakesArrayRefOfRoles'
=> '2.1403',
'Moose::Exception::CreateMOPClassTakesArrayRefOfSuperclasses'
=> '2.1403',
'Moose::Exception::CreateMOPClassTakesArrayRefOfAttributes'
=> '2.1403',
'Moose::Exception::CouldNotLocateTypeConstraintForUnion'
=> '2.1403',
'Moose::Exception::CouldNotGenerateInlineAttributeMethod'
=> '2.1403',
'Moose::Exception::CouldNotFindTypeConstraintToCoerceFrom'
=> '2.1403',
'Moose::Exception::CouldNotEvalDestructor'
=> '2.1403',
'Moose::Exception::CouldNotCreateWriter'
=> '2.1403',
'Moose::Exception::CouldNotCreateMethod'
=> '2.1403',
'Moose::Exception::ConflictDetectedInCheckRoleExclusionsInToClass'
=> '2.1403',
'Moose::Exception::ConflictDetectedInCheckRoleExclusions'
=> '2.1403',
'Moose::Exception::CoercionNeedsTypeConstraint'
=> '2.1403',
'Moose::Exception::CoercingWithoutCoercions'
=> '2.1403',
'Moose::Exception::CodeBlockMustBeACodeRef'
=> '2.1403',
'Moose::Exception::CloneObjectExpectsAnInstanceOfMetaclass'
=> '2.1403',
'Moose::Exception::ClassNamesDoNotMatch'
=> '2.1403',
'Moose::Exception::ClassDoesTheExcludedRole'
=> '2.1403',
'Moose::Exception::CircularReferenceInAlso'
=> '2.1403',
'Moose::Exception::CanReblessOnlyIntoASubclass'
=> '2.1403',
'Moose::Exception::CanOnlyConsumeRole'
=> '2.1403',
'Moose::Exception::CannotRegisterUnnamedTypeConstraint'
=> '2.1403',
'Moose::Exception::CanOnlyWrapBlessedCode'
=> '2.1403',
'Moose::Exception::CannotOverrideBodyOfMetaMethods'
=> '2.1403',
'Moose::Exception::CannotMakeMetaclassCompatible'
=> '2.1403',
'Moose::Exception::CannotInlineTypeConstraintCheck'
=> '2.1403',
'Moose::Exception::CannotInitializeMooseMetaRoleComposite'
=> '2.1403',
'Moose::Exception::CannotGenerateInlineConstraint'
=> '2.1403',
'Moose::Exception::CannotFixMetaclassCompatibility'
=> '2.1403',
'Moose::Exception::CannotFindType'
=> '2.1403',
'Moose::Exception::CannotDelegateWithoutIsa'
=> '2.1403',
'Moose::Exception::CannotDelegateLocalMethodIsPresent'
=> '2.1403',
'Moose::Exception::CannotCreateMethodAliasLocalMethodIsPresent'
=> '2.1403',
'Moose::Exception::CannotCreateHigherOrderTypeWithoutATypeParameter'
=> '2.1403',
'Moose::Exception::CannotCoerceAWeakRef'
=> '2.1403',
'Moose::Exception::CannotCalculateNativeType'
=> '2.1403',
'Moose::Exception::CannotAutoDerefWithoutIsa'
=> '2.1403',
'Moose::Exception::CannotAugmentNoSuperMethod'
=> '2.1403',
'Moose::Exception::CannotAugmentIfLocalMethodPresent'
=> '2.1403',
'Moose::Exception::AddParameterizableTypeTakesParameterizableType'
=> '2.1403',
'Moose::Exception::AttachToClassNeedsAClassMOPClassInstanceOrASubclass'
=> '2.1403',
'Moose::Exception::CannotApplyBaseClassRolesToRole'
=> '2.1403',
'Moose::Exception::CannotAddAsAnAttributeToARole'
=> '2.1403',
'Moose::Exception::CannotAddAdditionalTypeCoercionsToUnion'
=> '2.1403',
'Moose::Exception::CallingReadOnlyMethodOnAnImmutableInstance'
=> '2.1403',
'Moose::Exception::CallingMethodOnAnImmutableInstance'
=> '2.1403',
'Moose::Exception::BuilderMustBeAMethodName'
=> '2.1403',
'Moose::Exception::BuilderMethodNotSupportedForAttribute'
=> '2.1403',
'Moose::Exception::BuilderDoesNotExist'
=> '2.1403',
'Moose::Exception::BothBuilderAndDefaultAreNotAllowed'
=> '2.1403',
'Moose::Exception::BadOptionFormat'
=> '2.1403',
'Moose::Exception::AttributeValueIsNotDefined'
=> '2.1403',
'Moose::Exception::AttributeValueIsNotAnObject'
=> '2.1403',
'Moose::Exception::AttributeNamesDoNotMatch'
=> '2.1403',
'Moose::Exception::AttributeMustBeAnClassMOPMixinAttributeCoreOrSubclass'
=> '2.1403',
'Moose::Exception::AttributeExtensionIsNotSupportedInRoles'
=> '2.1403',
'Moose::Exception::AttributeConflictInRoles'
=> '2.1403',
'Moose::Exception::ApplyTakesABlessedInstance'
=> '2.1403',
'Moose::Exception::AddRoleToARoleTakesAMooseMetaRole'
=> '2.1403',
'Moose::Exception::AddRoleTakesAMooseMetaRoleInstance'
=> '2.1403',
'Moose::Exception::CannotCallAnAbstractMethod'
=> '2.1403',
'Moose::Exception::AccessorMustReadWrite'
=> '2.1403',
'Moose::Util::MetaRole'
=> '2.1403',
'Moose::Meta::Class'
=> '2.1403',
'Moose::Util'
=> '2.1403',
'Moose::Exception'
=> '2.1403',
'Config'
=> '5.020001',
'Exporter'
=> '5.71',
're'
=> '0.26',
'File::Basename'
=> '2.85',
'overload'
=> '1.22',
'Scalar::Util'
=> '1.41',
'constant'
=> '1.31',
'File::Spec::Unix'
=> '3.48',
'Cwd'
=> '3.48',
'vars'
=> '1.03',
'Class::Struct'
=> '0.65',
'File::stat'
=> '1.07',
'Tie::Hash'
=> '1.05',
'IO::Seekable'
=> '1.10',
'SelectSaver'
=> '1.02',
'Symbol'
=> '1.07',
'IO'
=> '1.31',
'IO::Dir'
=> '1.10',
'IO::Pipe'
=> '1.15',
'IO::Socket'
=> '1.37',
'IO::Select'
=> '1.22',
'IO::Socket::INET'
=> '1.35',
'Errno'
=> '1.20_03',
'IO::Socket::UNIX'
=> '1.26',
'Socket'
=> '2.016',
'Exporter::Tiny'
=> '0.042',
'List::MoreUtils::XS'
=> '0.402',
'feature'
=> '1.36',
'IO::File'
=> '1.16',
'IO::Handle'
=> '1.35',
'mro'
=> '1.16',
'Devel::InnerPackage'
=> '0.4',
'File::Spec::Functions'
=> '3.48',
'deprecate'
=> '0.03',
'File::Find'
=> '1.27',
'Class::MOP'
=> '2.1403',
'Dist::CheckConflicts'
=> '0.11',
'Package::DeprecationManager'
=> '0.13',
'Devel::StackTrace'
=> '2.00',
'List::MoreUtils'
=> '0.402',
'Sub::Name'
=> '0.12',
'Sub::Exporter'
=> '0.987',
'parent'
=> '0.228',
'Devel::PartialDump'
=> '0.17',
'Eval::Closure'
=> '0.11',
'Data::Dumper'
=> '2.154',
'MRO::Compat'
=> '0.12',
'Devel::GlobalDestruction'
=> '0.13',
'metaclass'
=> '2.1403',
'MooseX::SemiAffordanceAccessor::Role::Attribute'
=> '0.10',
'B'
=> '1.48',
'DynaLoader'
=> '1.25',
'Sub::Identify'
=> '0.10',
'B::Hooks::EndOfScope'
=> '0.13',
'B::Hooks::EndOfScope::PP'
=> '0.13',
'B::Hooks::EndOfScope::XS'
=> '0.13',
'overloading'
=> '0.02',
'overload::numbers'
=> 'undef',
'Term::Cap'
=> '1.16',
'AI::Categorizer'
=> '0.09',
'AI::Categorizer::Collection::Files'
=> 'undef',
'AI::Categorizer::Learner::NaiveBayes'
=> 'undef',
'Algorithm::NaiveBayes::Model::Frequency'
=> 'undef',
'File::ChangeNotify'
=> '0.24',
'File::Copy'
=> '2.30',
'List::MoreUtils::PP'
=> '0.402',
'Modern::Perl'
=> '1.20140107',
'File::Spec'
=> '3.48',
'File::Spec::Win32'
=> '3.48',
'warnings'
=> '1.23',
'strict'
=> '1.08',
'Fcntl'
=> '1.11',
'if'
=> '0.0603',
'warnings::register'
=> '1.03',
'Carp'
=> '1.3301',

Scandeps -x

# Use of runtime loader module Module::Implementation detected. Results
of static scanning may be incomplete.
# Use of runtime loader module Module::Runtime detected. Results of
static scanning may be incomplete.
(set by Moose): No such file or directory at
C:/perl/site/lib/Module/ScanDeps/DataFeed.pm line 26.
END failed--call queue aborted.
SYSTEM ERROR in executing test.pl : 512 at
C:/perl/site/lib/Module/ScanDeps.pm line 1348.

scandeps -c

# Use of runtime loader module Module::Implementation detected. Results
of static scanning may be incomplete.
# Use of runtime loader module Module::Runtime detected. Results of
static scanning may be incomplete.
(set by Moose): No such file or directory at
C:/perl/site/lib/Module/ScanDeps/DataFeed.pm line 26.
CHECK failed--call queue aborted.
SYSTEM ERROR in compiling test.pl: 512 at
C:/perl/site/lib/Module/ScanDeps.pm line 1348.
Roderich Schupp via RT
2015-01-16 10:32:34 UTC
Permalink
Fri Jan 16 05:32:32 2015: Request 101569 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: new
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Post by via RT
Example code attached
It's missing...
I can't reproduce the problem with a simplistic

scandeps -c -e 'use File::ChangeNotify;'


Cheers, Roderich
via RT
2015-01-18 21:50:52 UTC
Permalink
Sun Jan 18 16:50:51 2015: Request 101569 was acted upon.
Transaction: Correspondence added by ***@skipfault.com
Queue: Module-ScanDeps
Subject: Re: [rt.cpan.org #101569] Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >


Hi Roderich,

Not sure why the attachment didn't come through correctly.

I'm using the following code as a quick test :

use Modern::Perl;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';
use Fcntl qw(:flock);
use strict;
use warnings;
use AI::Categorizer;
use AI::Categorizer::Collection::Files;
use Algorithm::NaiveBayes::Model::Frequency;
use File::Spec;
use File::Copy;
use File::ChangeNotify;
use AI::Categorizer::Learner::NaiveBayes;
use List::MoreUtils::PP;


and the complete code is :

#!/usr/bin/perl
use Modern::Perl;
no warnings;
no if $] >= 5.017011, warnings => 'experimental::smartmatch';

# do singleton check and possible bailout as early as possible.
use Fcntl qw(:flock);
my $lockfile = 'E:\\FlowData\\PreProcess\\classifier.lock';

sub BailOut {
print "$0 is already running. Exiting.\n";
exit(1);
}
open( my $fhpid, '>>', $lockfile ) or die "error: open '$lockfile': $!";
flock( $fhpid, LOCK_EX | LOCK_NB ) or BailOut();
use strict;
no warnings;
use AI::Categorizer;
use AI::Categorizer::Collection::Files;
use Algorithm::NaiveBayes::Model::Frequency;
use File::Spec;
use File::Copy;
use File::ChangeNotify;
our $cat_file = 'E:\\FlowData\\PreProcess\\cats.txt';
our $path = 'E:\\FlowData\\ALL';
my $watcher = File::ChangeNotify->instantiate_watcher(
directories => [$path],
filter => qr/\.(?:xml)$/,
);
use AI::Categorizer::Learner::NaiveBayes;
our %files;
our $nb =
AI::Categorizer::Learner::NaiveBayes->restore_state('E:\\FlowData\\PreProcess\\state');

print "Begining to watch $path for changes.\n";
while ( my @events = $watcher->wait_for_events() ) {
print "New files have been detected.\n";
open my $out_fh, '>', $cat_file;
opendir( DIR, $path ) or die $!;
while ( my $file = readdir(DIR) ) {

# Use a regular expression to ignore files beginning with a period
next if ( $file =~ m/^\./ );
print {$out_fh} "$file \n";
}
closedir(DIR);
close $out_fh;
my $c = new AI::Categorizer::Collection::Files( path => $path,
category_file => $cat_file );
while ( my $document = $c->next ) {
my $hypothesis = $nb->categorize($document);
print "Classified ", $hypothesis->document_name();
print " as ", $hypothesis->best_category, "\n";
my $original = $path . "\\" . $hypothesis->document_name();
my $classified =
'E:\\FlowData\\PreProcess\\'.$hypothesis->best_category().'\\'.$hypothesis->document_name();
if ( $original =~ /^(.*)$/ ) {
$original = $1; # $data now untainted
} else {
die "Bad data in $original"; # log this somewhere
}
if ( $classified =~ /^(.*)$/ ) {
$classified = $1; # $data now untainted
} else {
die "Bad data in $classified"; # log this somewhere
}
move( $original, $classified );
}
}
Post by via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Post by via RT
Example code attached
It's missing...
I can't reproduce the problem with a simplistic
scandeps -c -e 'use File::ChangeNotify;'
Cheers, Roderich
via RT
2015-01-18 22:49:00 UTC
Permalink
Sun Jan 18 17:48:59 2015: Request 101569 was acted upon.
Transaction: Correspondence added by ***@skipfault.com
Queue: Module-ScanDeps
Subject: Re: [rt.cpan.org #101569] Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >


Strangely, your simplistic test also fails on my machine :

PS>scandeps -c -e 'use File::ChangeNotify;'
# Use of runtime loader module Module::Runtime detected. Results of
static scanning may be incomplete.
# Use of runtime loader module Module::Implementation detected. Results
of static scanning may be incomplete.
(set by Moose): No such file or directory at
C:/perl/site/lib/Module/ScanDeps/DataFeed.pm line 26.
CHECK failed--call queue aborted.
SYSTEM ERROR in compiling C:\Users\DTRZCI~1\AppData\Local\Temp\gVaoBef3eG:
512 at C:/perl/site/lib/Module/ScanDeps.pm line 1348.


For some additional information, my environment and Module::ScanDeps
version is as follows :


PS C:\Users\dtrzcinski\workspace\Clear Pre Processing> perl -V
Summary of my perl5 (revision 5 version 20 subversion 1) configuration:

Platform:
osname=MSWin32, osvers=6.1, archname=MSWin32-x86-multi-thread
uname=''
config_args='undef'
hint=recommended, useposix=true, d_sigaction=undef
useithreads=define, usemultiplicity=define
use64bitint=undef, use64bitall=undef, uselongdouble=undef
usemymalloc=n, bincompat5005=undef
Compiler:
cc='cl', ccflags ='-nologo -GF -W3 -O1 -MD -Zi -DNDEBUG -DWIN32
-D_CONSOLE -DNO_STRICT -DPERL_TEXTMODE_SCRIPTS -DPE
RL_IMPLICIT_CONTEXT -DPERL_IMPLICIT_SYS -DUSE_PERLIO -D_USE_32BIT_TIME_T',
optimize='-O1 -MD -Zi -DNDEBUG',
cppflags='-DWIN32'
ccversion='18.00.31101', gccversion='', gccosandvers=''
intsize=4, longsize=4, ptrsize=4, doublesize=8, byteorder=1234
d_longlong=undef, longlongsize=8, d_longdbl=define, longdblsize=8
ivtype='long', ivsize=4, nvtype='double', nvsize=8, Off_t='__int64',
lseeksize=8
alignbytes=8, prototype=define
Linker and Libraries:
ld='link', ldflags ='-nologo -nodefaultlib -debug -opt:ref,icf
-libpath:"c:\perl\lib\CORE" -machine:x86'
libpth=\lib
libs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.lib ol
eaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib msvcrt.
lib
perllibs=oldnames.lib kernel32.lib user32.lib gdi32.lib winspool.lib
comdlg32.lib advapi32.lib shell32.lib ole32.li
b oleaut32.lib netapi32.lib uuid.lib ws2_32.lib mpr.lib winmm.lib
version.lib odbc32.lib odbccp32.lib comctl32.lib msv
crt.lib
libc=msvcrt.lib, so=dll, useshrplib=true, libperl=perl520.lib
gnulibc_version=''
Dynamic Linking:
dlsrc=dl_win32.xs, dlext=dll, d_dlsymun=undef, ccdlflags=' '
cccdlflags=' ', lddlflags='-dll -nologo -nodefaultlib -debug
-opt:ref,icf -libpath:"c:\perl\lib\CORE" -machine:x86
'


Characteristics of this binary (from libperl):
Compile-time options: HAS_TIMES HAVE_INTERP_INTERN MULTIPLICITY
PERLIO_LAYERS PERL_DONT_CREATE_GVSV
PERL_HASH_FUNC_ONE_AT_A_TIME_HARD
PERL_IMPLICIT_CONTEXT PERL_IMPLICIT_SYS
PERL_MALLOC_WRAP PERL_NEW_COPY_ON_WRITE
PERL_PRESERVE_IVUV USE_ITHREADS USE_LARGE_FILES
USE_LOCALE USE_LOCALE_COLLATE USE_LOCALE_CTYPE
USE_LOCALE_NUMERIC USE_PERLIO USE_PERL_ATOF
Built under MSWin32
Compiled at Jan 14 2015 14:56:04
@INC:
C:/perl/site/lib/MSWin32-x86-multi-thread
C:/perl/site/lib
C:/perl/lib
.


PS C:\Users\dtrzcinski\workspace\Clear Pre Processing> cpan -D
Module::ScanDeps
Colorize_output is set to true but Win32::Console::ANSI is not
installed. To activate colorized output, please install Win32::Console::ANSI.

CPAN: Storable loaded ok (v2.51)
Reading 'C:\Perl\cpan\Metadata'
Database was generated on Sun, 18 Jan 2015 10:53:18 GMT
Module::ScanDeps
-------------------------------------------------------------------------
CPAN: Module::CoreList loaded ok (v5.20141220)
(no description)
R/RS/RSCHUPP/Module-ScanDeps-1.17.tar.gz
C:\perl\site\lib\Module\ScanDeps.pm
Installed: 1.17
CPAN: 1.17 up to date
Roderich Schupp (RSCHUPP)
***@cpan.org

PS C:\Users\dtrzcinski\workspace\Clear Pre Processing> cpan -D
File::ChangeNotify
Colorize_output is set to true but Win32::Console::ANSI is not
installed. To activate colorized output, please install Win32::Console::ANSI.

CPAN: Storable loaded ok (v2.51)
Reading 'C:\Perl\cpan\Metadata'
Database was generated on Sun, 18 Jan 2015 10:53:18 GMT
File::ChangeNotify
-------------------------------------------------------------------------
CPAN: Module::CoreList loaded ok (v5.20141220)
(no description)
D/DR/DROLSKY/File-ChangeNotify-0.24.tar.gz
C:\perl\site\lib\File\ChangeNotify.pm
Installed: 0.24
CPAN: 0.24 up to date
Dave Rolsky (DROLSKY)
Post by via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Post by via RT
Example code attached
It's missing...
I can't reproduce the problem with a simplistic
scandeps -c -e 'use File::ChangeNotify;'
Cheers, Roderich
Roderich Schupp via RT
2015-01-18 23:59:17 UTC
Permalink
Sun Jan 18 18:59:11 2015: Request 101569 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Yeah, fails for me on Windows, too, but works on Linux.

Cheers, Roderich
Roderich Schupp via RT
2015-01-19 13:27:15 UTC
Permalink
Mon Jan 19 08:27:09 2015: Request 101569 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Post by Roderich Schupp via RT
Yeah, fails for me on Windows, too, but works on Linux.
OK, nailed it:
Moose puts "fake" entries into %INC, eg.

$INC{"E:\\Strawberry\\perl\\site\\lib\\Module\\ScanDeps\\DataFeed.pm"} = "(set by Moose)";

Later on Modules::ScanDeps::DataFeed innocently tries to print
out the contents of %INC by (slightly simplified)

while (my ($k, $v) = each %INC)
{
print "$k => ", Cwd::abs_path($v), "\n";
}

Now here's the difference between Linux and Windows:

Linux:
$ perl -MCwd -E "say Cwd::abs_path('(set by Moose)'); say 'OK';"
/home/roderich/(set by Moose)
OK
Post by Roderich Schupp via RT
perl -MCwd -E "say Cwd::abs_path('(set by Moose)'); say 'OK';"
(set by Moose): No such file or directory at -e line 1.

Please try the following patch for Module::ScanDeps.

Cheers, Roderich

--- lib/Module/ScanDeps/DataFeed.pm~ 2014-02-09 16:09:11.000000000 +0100
+++ lib/Module/ScanDeps/DataFeed.pm 2015-01-19 14:13:30.299294400 +0100
@@ -23,7 +23,7 @@
# (2) If a key in %INC was located via a CODE or ARRAY ref or
# blessed object in @INC the corresponding value in %INC contains
# the ref from @INC.
- if (defined $v && !ref $v)
+ if (defined $v && !ref $v && -e $v)
{
$_INC{$k} = Cwd::abs_path($v);
}
via RT
2015-01-19 21:36:19 UTC
Permalink
Mon Jan 19 16:36:13 2015: Request 101569 was acted upon.
Transaction: Correspondence added by ***@skipfault.com
Queue: Module-ScanDeps
Subject: Re: [rt.cpan.org #101569] Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >


That did the trick. Both -c and -x are now operational.
Post by via RT
<URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Post by Roderich Schupp via RT
Yeah, fails for me on Windows, too, but works on Linux.
Moose puts "fake" entries into %INC, eg.
$INC{"E:\\Strawberry\\perl\\site\\lib\\Module\\ScanDeps\\DataFeed.pm"}
= "(set by Moose)";
Later on Modules::ScanDeps::DataFeed innocently tries to print
out the contents of %INC by (slightly simplified)
while (my ($k, $v) = each %INC)
{
print "$k => ", Cwd::abs_path($v), "\n";
}
$ perl -MCwd -E "say Cwd::abs_path('(set by Moose)'); say 'OK';"
/home/roderich/(set by Moose)
OK
Post by Roderich Schupp via RT
perl -MCwd -E "say Cwd::abs_path('(set by Moose)'); say 'OK';"
(set by Moose): No such file or directory at -e line 1.
Please try the following patch for Module::ScanDeps.
Cheers, Roderich
--- lib/Module/ScanDeps/DataFeed.pm~ 2014-02-09 16:09:11.000000000
+0100
+++ lib/Module/ScanDeps/DataFeed.pm 2015-01-19 14:13:30.299294400
+0100
@@ -23,7 +23,7 @@
# (2) If a key in %INC was located via a CODE or ARRAY ref or
- if (defined $v && !ref $v)
+ if (defined $v && !ref $v && -e $v)
{
$_INC{$k} = Cwd::abs_path($v);
}
Roderich Schupp via RT
2015-01-19 21:58:32 UTC
Permalink
Mon Jan 19 16:58:31 2015: Request 101569 was acted upon.
Transaction: Correspondence added by RSCHUPP
Queue: Module-ScanDeps
Subject: Incorrect module parsing if Moose is included
Broken in: (no value)
Severity: (no value)
Owner: Nobody
Requestors: ***@skipfault.com
Status: open
Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=101569 >
Post by via RT
That did the trick. Both -c and -x are now operational.
Thanks for testing. Fix is contained in Module::ScanDeps 1.18, just released.

Cheers, Roderich

Loading...