NAME

Venus::Task::Venus::New - vns new

ABSTRACT

Task Class for Venus CLI

SYNOPSIS

use Venus::Task::Venus::New;

my $task = Venus::Task::Venus::New->new;

# bless(.., 'Venus::Task::Venus::New')

DESCRIPTION

This package is a task class for the vns-new CLI, and vns new sub-command.

INHERITS

This package inherits behaviors from:

Venus::Task::Venus

METHODS

This package provides the following methods:

new

new(any @args) (Venus::Task::Venus::New)

The new method constructs an instance of the package.

Since 4.15

new example 1
package main;

use Venus::Task::Venus::New;

my $task = Venus::Task::Venus::New->new;

# bless({...}, 'Venus::Task::Venus::New')

perform

perform() (Venus::Task::Venus::New)

The perform method executes the CLI logic.

Since 4.15

perform example 1
# given: synopsis

package main;

$task->prepare;

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.pl file
perform example 2
# given: synopsis

package main;

$task->prepare;

$task->parse('pl');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.pl file
perform example 3
# given: synopsis

package main;

$task->prepare;

$task->parse('perl');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.perl file
perform example 4
# given: synopsis

package main;

$task->prepare;

$task->parse('json');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.json file
perform example 5
# given: synopsis

package main;

$task->prepare;

$task->parse('js');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.js file
perform example 6
# given: synopsis

package main;

$task->prepare;

$task->parse('yaml');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.yaml file
perform example 7
# given: synopsis

package main;

$task->prepare;

$task->parse('yml');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# creates a .vns.yml file
perform example 8
# given: synopsis

package main;

$task->prepare;

$task->parse('toml');

my $perform = $task->perform;

# bless(.., 'Venus::Task::Venus::New')

# Error: type "toml" invalid

AUTHORS

Awncorp, awncorp@cpan.org

LICENSE

Copyright (C) 2022, Awncorp, awncorp@cpan.org.

This program is free software, you can redistribute it and/or modify it under the terms of the Apache license version 2.0.