| 1 | package JavaScript::Framework::jQuery::Subtypes; | ||
| 2 | |||
| 3 | 12 | my @type; | |
| 4 | 12 | ▶ | BEGIN { |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 5 | 12 | @type = qw( | |
| 6 | cssAsset | ||
| 7 | cssAssetList | ||
| 8 | libraryAssets | ||
| 9 | pluginAssets | ||
| 10 | ); | ||
| 11 | } | ||
| 12 | |||
| 13 | 12 | ▶ | use warnings; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 14 | 12 | ▶ | use strict; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 15 | |||
| 16 | 12 | ▶ | use MooseX::Types::Moose qw( Int Str ArrayRef HashRef ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 17 | 12 | ▶ | use MooseX::Types::Structured qw( Dict ); |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 18 | 12 | ▶ | use MooseX::Types -declare => [ @type ]; |
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||
| 19 | |||
| 20 | 12 | our $VERSION = '0.05'; | |
| 21 | |||
| 22 | 12 | subtype cssAsset, | |
| 23 | as Dict[ | ||
| 24 | href => Str, | ||
| 25 | media => Str, | ||
| 26 | ]; | ||
| 27 | |||
| 28 | 12 | subtype cssAssetList, | |
| 29 | as ArrayRef[ cssAsset ]; | ||
| 30 | |||
| 31 | 12 | subtype libraryAssets, | |
| 32 | as Dict[ | ||
| 33 | src => ArrayRef[ Str ], | ||
| 34 | css => cssAssetList, | ||
| 35 | ]; | ||
| 36 | |||
| 37 | 12 | subtype pluginAssets, | |
| 38 | as ArrayRef [ | ||
| 39 | Dict[ | ||
| 40 | name => Str, | ||
| 41 | library => libraryAssets, | ||
| 42 | ] | ||
| 43 | ]; | ||
| 44 | |||
| 45 | 12 | 1; | |
| 46 | |||
| 47 | =head1 NAME | ||
| 48 | |||
| 49 | JavaScript::Framework::jQuery::Subtypes - MooseX::Types type declarations | ||
| 50 | |||
| 51 | =head1 SYNOPSIS | ||
| 52 | |||
| 53 | use JavaScript::Framework::jQuery::Subtypes ':all'; | ||
| 54 | |||
| 55 | # now you may use custom types in your 'has' declarations in Moose packages. | ||
| 56 | |||
| 57 | =head1 DESCRIPTION | ||
| 58 | |||
| 59 | This module provides all the subtype declarations for the Moose packages | ||
| 60 | in the JavaScript::Framework::jQuery namespace. | ||
| 61 | |||
| 62 | =head1 TYPES DEFINED | ||
| 63 | |||
| 64 | =head2 cssAsset | ||
| 65 | |||
| 66 | List of hash references, keys 'href' and 'media'. | ||
| 67 | |||
| 68 | =head2 cssAssetList | ||
| 69 | |||
| 70 | Reference to an array of cssAsset-type items. | ||
| 71 | |||
| 72 | =head2 libraryAssets | ||
| 73 | |||
| 74 | Reference to an array of references to hashes of 'src' (array ref) and | ||
| 75 | 'css'. | ||
| 76 | |||
| 77 | =head2 pluginAssets | ||
| 78 | |||
| 79 | Reference to an array of references to hashes of 'name' and 'library' (reference | ||
| 80 | to an array of items of type libraryAssets). | ||
| 81 | |||
| 82 | =head1 AUTHOR | ||
| 83 | |||
| 84 | David P.C. Wollmann E<lt>converter42 at gmail.comE<gt> | ||
| 85 | |||
| 86 | =head1 COPYRIGHT & LICENSE | ||
| 87 | |||
| 88 | Copyright 2009 David P.C. Wollmann, all rights reserved. | ||
| 89 | |||
| 90 | This program is free software; you can redistribute it and/or modify it | ||
| 91 | under the same terms as Perl itself. | ||
| 92 | |||