Rex::Box::Base(3pm)
π Rex::Box::Base β the manual, but make it cute
okay so this is the Rex::Box::Base(3pm) page, from the User Contributed Perl Documentation section, and bestie it is exactly what it sounds like: the base module that every other Rex::Box module is built on. sit down, grab a strawberry lemonade π, we're learning this together.
πΈ NAME πΈ
Rex::Box::Base β the Rex/Boxes Base Module. she's the blueprint, the template, the mother of all boxes. periodt. π
β¨ DESCRIPTION β¨
This is a Rex/Boxes base module. that's it, that's the whole vibe β she's the foundation, the base class, the one everyone else inherits from. iykyk π
π¦ METHODS π¦
These methods are shared across all other Rex::Box modules. so like, whichever box provider you're using, these are the ones you already know. no cap. π₯
π info
Returns a hashRef of vm information. all the deets, in one handy reference. π
π name($vmname)
Sets the name of the virtual machine. give your VM a cute lil identity, bestie. π«Ά
π setup(@tasks)
Sets the tasks that should be executed as soon as the VM is available through SSH. like, the moment she wakes up and answers the door, these tasks run. instant main character energy. β¨
π storage('path/to/vm/disk')
Sets the disk path of the virtual machine. ποΈ
heads up bestie: this one works only on KVM. don't try it elsewhere, she will not show up to the party. π
π import_vm()
This method must be overwritten by the implementing class. you literally have to do it yourself β she's handing you the pencil ποΈ, no take-backs.
π stop()
Stops the VM. nap time. π΄
π destroy()
Destroy the VM. absolutely obliterated. no survivors ππ₯
π start()
Starts the VM. wake up queen, you have rex tasks to run π
π ip()
Return the ip:port to which rex will connect to. the address where all the magic happens πͺ
π status()
Returns the status of a VM. a lil vibe check, honestly.
Valid return values are "running" and "stopped".
π provision_vm([@tasks])
Executes the given tasks on the VM. you bring the to-do list, she brings the SSH π«Ά
π cpus($count)
Set the amount of CPUs for the VM. more cpus = more girlboss, mathematically π
π memory($memory_size)
Sets the memory of a VM in megabyte. (megabytes, bestie β keep the units straight π)
π network(%option)
Configure the network for a VM. π
Currently it supports 2 modes: nat and bridged. Currently it supports only one network card.
the nat one, looking like:
$box->network(
1 => {
type => "nat",
},
);
and the bridged one, looking like:
$box->network(
1 => {
type => "bridged",
bridge => "eth0",
},
);
see? she ate. π
π forward_port(%option)
Set ports to be forwarded to the VM.
ngl bestie, this is not supported by all Box providers. check before you commit, fr fr.
and here's the shape of it:
$box->forward_port(
name => [$from_host_port, $to_vm_port],
name2 => [$from_host_port_2, $to_vm_port_2],
...
);
name it, map it, forward it. so satisfying. π
π list_boxes
List all available boxes. window shopping but for VMs ποΈ
π url($url)
The URL where to download the Base VM Image. π₯
You can use self-made images or prebuild images from <http://box.rexify.org/>. do it yourself, or let the internet do it for you β both iconic.
π auth(%option)
Configure the authentication to the VM. π
$box->auth(
user => $user,
password => $password,
private_key => $private_key,
public_key => $public_key,
);
keys and passwords, pick your fighter π
π options(%option)
Addition options for boxes. the lil extras, the finishing touch β¨
$box->options(
opt1 => $val1,
opt2 => $val2,
);
that's the whole page bestie, we did it, we read the entire thing, and honestly? obsessed. ππ¦π
okay love you byeee β this was Rex::Box::Base from perl v5.40.1, dated 2025-10-03. written down, remembered forever, periodt. πΈπβ¨
π¦ where this page comes from
- ubuntu resolute: rex 1.16.1-1 Β· Apache-2.0
- ubuntu stonking: rex 1.16.1-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms