-
Notifications
You must be signed in to change notification settings - Fork 151
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Expand annotations to cover all generated methods
This is needed for the next commit, as we need a reliable way to tell gened methods apart from everything else. Given we will be taking the hit of adding the attributes, just go ahead and annotate *everything*, to be done with all auto-generated subs once and for all. This also solves @vanstyn's long-time gripe of not being able to tell where in a random schema one has declared m2m "relationships" (a typical customer is *very* unlikely to be using DBIC::IntrospectableM2M) As of this commit a typical Result can be introspected for m2m as follows: ~$ perl -Ilib -It/lib -MDBICTest -MPackage::Stash -e ' my $meths = Package::Stash->new("DBICTest::Schema::Artwork") ->get_all_symbols("CODE"); for my $m (sort keys %$meths ) { print "$m\n" if grep { $_ =~ /^DBIC_method_is_m2m_sugar/ } attributes::get($meths->{$m}); } ' While the more involved "complete method map" looks as follows: ~$ perl -Ilib -It/lib -MDBICTest -MPackage::Stash -e ' my $meths = Package::Stash->new("DBICTest::Schema::CD") ->get_all_symbols("CODE"); for my $m (sort keys %$meths ) { if ( my @attrs = attributes::get($meths->{$m}) ) { print "\n$m\n"; print " $_\n" for @attrs; } } '
- Loading branch information
Showing
6 changed files
with
220 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters