Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 28 additions & 0 deletions .github/workflows/static.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: static

on:
push:
branches:
- '*'
tags-ignore:
- '*'
pull_request:

jobs:
perl:

runs-on: ubuntu-latest

env:
CIP_TAG: static

steps:
- uses: actions/checkout@v2

- name: Bootstrap CIP
run: |
curl -L https://raw.githubusercontent.com/uperl/cip/main/bin/github-bootstrap | bash

- name: Build + Test
run: |
cip script
2 changes: 2 additions & 0 deletions .mailmap
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
Jesse Luehrs <[email protected]> doy <[email protected]>
Graham Ollis <[email protected]> Graham Ollis <[email protected]>
Graham Ollis <[email protected]> Graham✈️✈️ <[email protected]>
4 changes: 3 additions & 1 deletion Changes
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
Revision history for MooseX-NonMoose

{{$NEXT}}
- Drop dependency on List::MoreUtils
- New maintainer and repository: https://github.com/uperl/MooseX-NonMoose

0.26 2014-02-25
- fix dependency specification for Try::Tiny (Gareth Harper, #9)
- fix dependency specification for Try::Tiny (Gareth Harper, https://github.com/doy/moosex-nonmoose/pull/9)

0.25 2014-02-06
- fix for Module::Runtime 0.014
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# MooseX::NonMoose
# MooseX::NonMoose ![static](https://github.com/uperl/MooseX-NonMoose/workflows/static/badge.svg) ![linux](https://github.com/uperl/MooseX-NonMoose/workflows/linux/badge.svg)

easy subclassing of non-Moose classes

Expand Down Expand Up @@ -94,7 +94,7 @@ although using method modifiers on the constructor should work identically to
normal Moose classes.

Please report any bugs to GitHub Issues at
[https://github.com/doy/moosex-nonmoose/issues](https://github.com/doy/moosex-nonmoose/issues).
[https://github.com/uperl/moosex-nonmoose/issues](https://github.com/uperl/moosex-nonmoose/issues).

# SEE ALSO

Expand All @@ -120,7 +120,7 @@ You can also look for information at:

- Github

[https://github.com/doy/moosex-nonmoose](https://github.com/doy/moosex-nonmoose)
[https://github.com/uperl/moosex-nonmoose](https://github.com/uperl/moosex-nonmoose)

- RT: CPAN's request tracker

Expand All @@ -132,7 +132,7 @@ Jesse Luehrs <[email protected]>

# COPYRIGHT AND LICENSE

This software is copyright (c) 2024 by Jesse Luehrs.
This software is copyright (c) 2009-2025 by Jesse Luehrs.

This is free software; you can redistribute it and/or modify it under
the same terms as the Perl 5 programming language system itself.
8 changes: 8 additions & 0 deletions author.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
---
pod_coverage:
skip: 0
# format is "Class#method" or "Class", regex allowed
# for either Class or method.
private:
- .*#init_meta

54 changes: 36 additions & 18 deletions dist.ini
Original file line number Diff line number Diff line change
@@ -1,28 +1,46 @@
name = MooseX-NonMoose
author = Jesse Luehrs <[email protected]>
name = MooseX-NonMoose
author = Jesse Luehrs <[email protected]>
autgor = Graham Ollis <[email protected]>
license = Perl_5
copyright_holder = Jesse Luehrs
copyright_year = 2009-2025
version = 0.26

[@Filter]
-bundle = @DOY
-version = 0.14
-remove = Git::NextVersion
dist = MooseX-NonMoose
repository = github
[@Author::Plicease]
:version = 2.79
release_tests = 1
installer = MakeMaker
github_user = uperl

[AutoPrereqs]
skip = ^BadFoo\d?\b
skip = ^Foo\b
skip = ^Bar\b
skip = ^NonMoose$
skip = ^IO::
diag = +MooseX::GlobRef
diag = +MooseX::InsideOut

workflow = static
workflow = linux

[Author::Plicease::Upload]
cpan = 1

[PruneFiles]
filename = xt/author/pod_spelling_system.t
filename = xt/author/strict.t

[ContributorsFromGit]

[Prereqs / TestRequires]
Test::More = 0.88

[RemovePrereqs]
remove = strict
remove = warnings
remove = MooseX::GlobRef
remove = MooseX::InsideOut
remove = IO::File
remove = IO::Handle

[Prereqs / DevelopRequires]
MooseX::GlobRef = 0
MooseX::InsideOut = 0

[Author::Plicease::ReadmeAnyFromPod / ReadMePodInRoot]
filename = README.md
location = root
type = gfm


7 changes: 5 additions & 2 deletions lib/MooseX/NonMoose.pm
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
package MooseX::NonMoose;

use Moose::Exporter;
use Moose::Util;

# ABSTRACT: easy subclassing of non-Moose classes
# VERSION

=head1 SYNOPSIS

Expand Down Expand Up @@ -116,7 +119,7 @@ normal Moose classes.
=back

Please report any bugs to GitHub Issues at
L<https://github.com/doy/moosex-nonmoose/issues>.
L<https://github.com/uperl/moosex-nonmoose/issues>.

=head1 SEE ALSO

Expand Down Expand Up @@ -147,7 +150,7 @@ L<https://metacpan.org/release/MooseX-NonMoose>

=item * Github

L<https://github.com/doy/moosex-nonmoose>
L<https://github.com/uperl/moosex-nonmoose>

=item * RT: CPAN's request tracker

Expand Down
3 changes: 3 additions & 0 deletions lib/MooseX/NonMoose/InsideOut.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package MooseX::NonMoose::InsideOut;

use Moose::Exporter;

# ABSTRACT: easy subclassing of non-Moose non-hashref classes
# VERSION

=head1 SYNOPSIS

Expand Down
9 changes: 6 additions & 3 deletions lib/MooseX/NonMoose/Meta/Role/Class.pm
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
package MooseX::NonMoose::Meta::Role::Class;
use Moose::Role;
# ABSTRACT: metaclass trait for L<MooseX::NonMoose>

use Moose::Role;
use List::Util 1.33 qw(any);
use Module::Runtime qw(use_package_optimistically);
use Try::Tiny;
use List::Util qw( any );
use Scalar::Util 'blessed';

# ABSTRACT: metaclass trait for L<MooseX::NonMoose>
# VERSION

=head1 SYNOPSIS

package Foo;
Expand Down Expand Up @@ -306,7 +309,7 @@ around superclasses => sub {

my @superclasses = @_;
push @superclasses, 'Moose::Object'
unless grep { !ref($_) && $_->isa('Moose::Object') } @superclasses;
unless any { !ref($_) && $_->isa('Moose::Object') } @superclasses;

my @ret = $self->$orig(@superclasses);

Expand Down
3 changes: 3 additions & 0 deletions lib/MooseX/NonMoose/Meta/Role/Constructor.pm
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package MooseX::NonMoose::Meta::Role::Constructor;

use Moose::Role 2.0000;

# ABSTRACT: constructor method trait for L<MooseX::NonMoose>
# VERSION

=head1 SYNOPSIS

Expand Down
6 changes: 0 additions & 6 deletions maint/cip-before-install

This file was deleted.

59 changes: 59 additions & 0 deletions perlcriticrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
severity = 1
only = 1

[Community::ArrayAssignAref]
[Community::BarewordFilehandles]
[Community::ConditionalDeclarations]
[Community::ConditionalImplicitReturn]
[Community::DeprecatedFeatures]
[Community::DiscouragedModules]
[Community::DollarAB]
[Community::Each]
[Community::EmptyReturn]
[Community::IndirectObjectNotation]
[Community::LexicalForeachIterator]
[Community::LoopOnHash]
[Community::ModPerl]
[Community::OpenArgs]
[Community::OverloadOptions]
[Community::POSIXImports]
[Community::PackageMatchesFilename]
[Community::PreferredAlternatives]
[Community::StrictWarnings]
extra_importers = Test2::V0
[Community::Threads]
[Community::Wantarray]
[Community::WarningsSwitch]
[Community::WhileDiamondDefaultAssignment]

[BuiltinFunctions::ProhibitBooleanGrep]
[BuiltinFunctions::ProhibitStringyEval]
[BuiltinFunctions::ProhibitStringySplit]
[BuiltinFunctions::ProhibitVoidGrep]
[BuiltinFunctions::ProhibitVoidMap]
[ClassHierarchies::ProhibitExplicitISA]
[ClassHierarchies::ProhibitOneArgBless]
[CodeLayout::ProhibitHardTabs]
allow_leading_tabs = 0
[CodeLayout::ProhibitTrailingWhitespace]
[CodeLayout::RequireConsistentNewlines]
[ControlStructures::ProhibitLabelsWithSpecialBlockNames]
[ControlStructures::ProhibitMutatingListFunctions]
[ControlStructures::ProhibitUnreachableCode]
[InputOutput::ProhibitBarewordFileHandles]
[InputOutput::ProhibitJoinedReadline]
[InputOutput::ProhibitTwoArgOpen]
[Miscellanea::ProhibitFormats]
[Miscellanea::ProhibitUselessNoCritic]
[Modules::ProhibitConditionalUseStatements]
;[Modules::RequireEndWithOne]
[Modules::RequireNoMatchVarsWithUseEnglish]
[Objects::ProhibitIndirectSyntax]
[RegularExpressions::ProhibitUselessTopic]
[Subroutines::ProhibitNestedSubs]
[ValuesAndExpressions::ProhibitLeadingZeros]
[ValuesAndExpressions::ProhibitMixedBooleanOperators]
[ValuesAndExpressions::ProhibitSpecialLiteralHeredocTerminator]
[ValuesAndExpressions::RequireUpperCaseHeredocTerminator]
[Variables::ProhibitPerl4PackageNames]
[Variables::ProhibitUnusedVariables]
97 changes: 97 additions & 0 deletions t/00_diag.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,97 @@
use strict;
use warnings;
use Config;
use Test::More tests => 1;

# This .t file is generated.
# make changes instead to dist.ini

my %modules;
my $post_diag;

$modules{$_} = $_ for qw(
ExtUtils::MakeMaker
List::Util
Module::Runtime
Moose
Moose::Exporter
Moose::Role
Moose::Util
MooseX::GlobRef
MooseX::InsideOut
Scalar::Util
Test2::Require::Module
Test::Fatal
Test::Moose
Test::More
Try::Tiny
);



my @modules = sort keys %modules;

sub spacer ()
{
diag '';
diag '';
diag '';
}

pass 'okay';

my $max = 1;
$max = $_ > $max ? $_ : $max for map { length $_ } @modules;
our $format = "%-${max}s %s";

spacer;

my @keys = sort grep /(MOJO|PERL|\A(LC|HARNESS)_|\A(SHELL|LANG)\Z)/i, keys %ENV;

if(@keys > 0)
{
diag "$_=$ENV{$_}" for @keys;

if($ENV{PERL5LIB})
{
spacer;
diag "PERL5LIB path";
diag $_ for split $Config{path_sep}, $ENV{PERL5LIB};

}
elsif($ENV{PERLLIB})
{
spacer;
diag "PERLLIB path";
diag $_ for split $Config{path_sep}, $ENV{PERLLIB};
}

spacer;
}

diag sprintf $format, 'perl', "$] $^O $Config{archname}";

foreach my $module (@modules)
{
my $pm = "$module.pm";
$pm =~ s{::}{/}g;
if(eval { require $pm; 1 })
{
my $ver = eval { $module->VERSION };
$ver = 'undef' unless defined $ver;
diag sprintf $format, $module, $ver;
}
else
{
diag sprintf $format, $module, '-';
}
}

if($post_diag)
{
spacer;
$post_diag->();
}

spacer;

Loading
Loading