ASP4x-Linker
view release on metacpan or search on metacpan
inc/Module/Install/Metadata.pm view on Meta::CPAN
$self->provides( %{ $build->find_dist_packages || {} } );
}
sub feature {
my $self = shift;
my $name = shift;
my $features = ( $self->{values}{features} ||= [] );
my $mods;
if ( @_ == 1 and ref( $_[0] ) ) {
# The user used ->feature like ->features by passing in the second
# argument as a reference. Accomodate for that.
$mods = $_[0];
} else {
$mods = \@_;
}
my $count = 0;
push @$features, (
$name => [
map {
lib/ASP4x/Linker.pm view on Meta::CPAN
Adds a "widget" to the widgets collection.
=head2 widget( $name )
Returns an individual L<ASP4x::Linker::Widget> object by that name.
Returns undef if no widget by that name is found.
=head2 uri( [$properties] )
Returns the uri for all widgets based on the intersect of:
=over 4
=item * The incoming form data from the original request
=item * Individually-set values for each widget in the collection.
=item * Any properties provided as an argument to C<uri()>.
=back
lib/ASP4x/Linker.pm view on Meta::CPAN
=head2 hidden_fields( [$properties] )
Returns a string of XHTML hidden input fields (<input type="hidden" name="$name" value="$value" />).
Useful if your persistence logic involves repeated form submissions rather than hyperlinks.
The C<$properties> argument is the same as in the C<uri()> method.
=head2 vars( [$properties] )
Returns a hashref representing the intersect of all widgets' names and attributes.
Supposing you setup your linker like this:
my $linker = ASP4x::Linker->new();
$linker->add_widget(
name => 'albums',
attrs => [qw( page sort )]
);
( run in 1.355 second using v1.01-cache-2.11-cpan-39bf76dae61 )