Perl-Dist-WiX

 view release on metacpan or  search on metacpan

lib/Perl/Dist/WiX.pm  view on Meta::CPAN


		# Install the Win32 extras
		'install_win32_extras',

		# Create the distribution list
		'create_distribution_list',

		# Check for missing files.
		'verify_msi_file_contents',

		# Regenerate file fragments again.
		'regenerate_fragments',

		# Write out the distributions
		'write',
	];
} ## end sub _build_tasklist



=head4 user_agent

The optional C<user_agent> parameter stores the L<LWP::UserAgent|LWP::UserAgent> 
object (or an object of a subclass of LWP::UserAgent) that Perl::Dist::WiX 
uses to download files.

The default creates an L<user_agent_cache|/user_agent_cache>
parameter.

=cut

has 'user_agent' => (
	is  => 'ro',
	isa => class_type(
		'LWP::UserAgent',
		{   message => sub {'Invalid user_agent'}
		}
	),
	lazy    => 1,
	writer  => '_set_user_agent',
	builder => '_build_user_agent',
	clearer => '_clear_user_agent',
);

sub _build_user_agent {
	my $self  = shift;
	my $class = ref $self;

	# Get the real class name after MooseX::Object::Pluggable
	# has messed with it.
	if ( $class =~ /MOP/ms ) {
		$class = $self->_original_class_name();
	}

	my $ua = LWP::UserAgent->new(
		agent => "$class/" . ( $VERSION || '0.00' ),
		timeout       => 30,
		show_progress => 1,
	);

	$ENV{HTTP_PROXY} and $ua->proxy( http => $ENV{HTTP_PROXY} );

	return $ua;
} ## end sub _build_user_agent



=head3 Parameters that describe the distribution to build.

These parameters specify the names/e-mails/etcetera used in making the distribution.

Some of these parameters are given no defaults by C<Perl::Dist::WiX>, so either
a subclass has to set these parameters, or they have to be specified.

=head4 app_id

The I<required> C<app_id> parameter provides the base identifier of the 
distribution that is used in constructing filenames by default.  This must 
be a legal Perl identifier (no spaces, for example.) 

=cut

has 'app_id' => (
	is  => 'ro',                       # String that passes _IDENTIFIER
	isa => subtype(
		Str => where { _IDENTIFIER($_) },
		message {'app_id must be a legal Perl identifier'}
	),
	required => 1,
);



=head4 app_name

The I<required> C<app_name> parameter provides the name of the distribution.

=cut

has 'app_name' => (
	is       => 'ro',
	isa      => Str,
	required => 1,
);



=head4 app_publisher

The I<required> C<app_publisher> parameter provides the publisher of the 
distribution. 

=cut

has 'app_publisher' => (
	is       => 'ro',
	isa      => Str,
	required => 1,
);




( run in 0.745 second using v1.01-cache-2.11-cpan-71847e10f99 )