Skip to content

Commit c3c80f5

Browse files
committed
Rename TODO.pod to TODO.md so it does not get installed by EUMM
1 parent 389eaa4 commit c3c80f5

File tree

1 file changed

+24
-29
lines changed

1 file changed

+24
-29
lines changed

TODO.pod renamed to TODO.md

Lines changed: 24 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
1-
=head1 Use Sub::Quote
1+
## Use Sub::Quote
22

33
One attempt at this exists in the sub-quotify branch.
44

55
This has several parts.
66

7-
First, type constraints should accept a single C<constraint> parameter, rather
8-
than both a constraint and an C<inline_generator>. If the C<constraint> is a
7+
First, type constraints should accept a single `constraint` parameter, rather
8+
than both a constraint and an `inline_generator`. If the `constraint` is a
99
Sub::Quote sub, we can use that for inlining. This greatly simplified the API.
1010

11-
The same should be done for the C<coercion> & C<inline_generator> parameters for
11+
The same should be done for the `coercion` & `inline_generator` parameters for
1212
coercions.
1313

1414
Finally, the message_generator should be allow for a Sub::Quote sub and use
1515
that for inlining if possible.
1616

1717
I'm not sure what the best API for the Sub::Quote subs is. Unlike with the
1818
existing generators, Sub::Quote expects that parameters are always passed via
19-
C<@_>. This probably means that the sub you write should always look at
20-
C<$_[0]>, which is a little gross when inlining, as it means we have to jam
21-
things into C<@_> with something like:
19+
`@_`. This probably means that the sub you write should always look at
20+
`$_[0]`, which is a little gross when inlining, as it means we have to jam
21+
things into `@_` with something like:
2222

23-
local @_ = ($value);
23+
local @_ = ($value);
2424

2525
Note that this also means B<not> passing in the type constraint/coercion as
2626
the first argument. In other words, these subs are no longer methods. This is
@@ -32,12 +32,7 @@ parameterized_inline_generator sub (not a Sub::Quote). This sub shoudl
3232
I<return> a quoted sub based on the type parameter. Sub::Quote makes this
3333
harder than it should be because it doesn't have a very nice API. Oh well.
3434

35-
=head1 Union types and other set operations?
36-
37-
I'm not a huge fan of unions, they really confuse the notion of parent type,
38-
for one thing. However, set operations on types are pretty useful.
39-
40-
=head1 Better integration with Moose
35+
## Better integration with Moose
4136

4237
Make Moose support inlining coercions and message generation with Specio objects.
4338

@@ -47,41 +42,41 @@ it's quite broken. In particular, the relationship between constraint &
4742
coercion objects is backwards. A constraint should have many coercions, not
4843
vice versa. Specio gets this right.
4944

50-
=head1 Support MooseX::Types barewords and string types with SpecioX modules
45+
## Support MooseX::Types barewords and string types with SpecioX modules
5146

5247
For barewords:
5348

54-
use SpecioX::Declare::Barewords => qw( Specio::Library::Builtins My::Library );
49+
use SpecioX::Declare::Barewords => qw( Specio::Library::Builtins My::Library );
5550

56-
use Moose;
51+
use Moose;
5752

58-
has foo => ( isa => Str );
53+
has foo => ( isa => Str );
5954

6055
For string types:
6156

62-
use SpecioX::StringTypes => qw( Specio::Library::Builtins My::Library );
57+
use SpecioX::StringTypes => qw( Specio::Library::Builtins My::Library );
6358

64-
use Moose;
59+
use Moose;
6560

66-
has foo => ( isa => 'Str' );
61+
has foo => ( isa => 'Str' );
6762

6863
Or something like that.
6964

7065
Internally these can both provide an attr trait and class trait that together
7166
look up a registry for the class by name, something like:
7267

73-
use Specio::Registry qw( registry_for_package );
68+
use Specio::Registry qw( registry_for_package );
7469

75-
my $registry = registry_for_package($package);
70+
my $registry = registry_for_package($package);
7671

77-
To parse things like C<"ArrayRef[Str]"> we need to separate the type string
72+
To parse things like `"ArrayRef[Str]"` we need to separate the type string
7873
parsing into its module that can return a data structure like:
7974

80-
%parsed = (
81-
name => 'ArrayRef',
82-
parameter => 'Str',
83-
);
75+
%parsed = (
76+
name => 'ArrayRef',
77+
parameter => 'Str',
78+
);
8479

8580
Then we can look these up with:
8681

87-
my $type = t( $parsed{name}, of => t( $parsed{parameter} ) );
82+
my $type = t( $parsed{name}, of => t( $parsed{parameter} ) );

0 commit comments

Comments
 (0)