ce166e3afc19cbe8b72535250d47a75568e5d760
[scpubgit/DX.git] / lib / DX / Utils.pm
1 package DX::Utils;
2
3 use strictures 2;
4 use Exporter 'import';
5
6 our @EXPORT_OK = qw(INDICES INDEX_EXISTS ROOT_ONLY step string number);
7
8 use constant INDICES => \*INDICES;
9 use constant INDEX_EXISTS => \*INDEX_EXISTS;
10 use constant ROOT_ONLY => \*ROOT_ONLY;
11
12 sub step {
13   DX::Step::Normal->new(@_);
14 }
15
16 sub string {
17   DX::Value::String->new(string_value => $_[0])
18 }
19
20 sub number {
21   DX::Value::Number->new(number_value => $_[0]);
22 }
23
24 # Here so that circular require doesn't stab us in the face
25
26 require DX::Step::Normal;
27 require DX::Value::String;
28 require DX::Value::Number;
29
30 1;