App-BundleDeps
view release on metacpan or search on metacpan
lib/App/BundleDeps/Platypus.pm view on Meta::CPAN
foreach my $elem qw(app author icon identifier platypus resources default_resources script version background) {
my $str = "sub $elem { my (\$self, \@args) = \@_; my \$ret = \$self->{$elem}; \$self->{$elem} = shift \@args if \@args; return \$ret }";
eval $str;
die if $@;
}
sub new {
my ($class, @args) = @_;
my $self = $class->SUPER::new(
author => $ENV{USER},
icon => 'appIcon.icns',
resources => [],
background => 0,
@args,
default_resources => [ 'lib', 'extlib' ]
);
if (! $self->app) {
my $script = $self->script;
lib/App/BundleDeps/Platypus.pm view on Meta::CPAN
if (! $self->identifier) {
my $app = $self->app;
$app =~ tr/ //d;
$self->identifier( "com.example." . $self->author . ".app");
}
return $self;
}
sub bundle {
my $self = shift;
$self->SUPER::bundle();
$self->build_platypus_app();
}
sub build_platypus_app {
my $self = shift;
my $app_path = $self->app . ".app";
if (-e $app_path) {
rmtree($app_path);
}
( run in 0.866 second using v1.01-cache-2.11-cpan-49f99fa48dc )